summaryrefslogtreecommitdiff
path: root/efl/ethumb
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-04-11 18:41:50 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-04-11 18:46:12 +0300
commitf169d4650d19e3e50a65fd027080ee283f967dad (patch)
tree6cde5d04e6fc05d4d851728edf85ca01d62a6aa9 /efl/ethumb
parentc342feab6f8821076adf0f2f2496f61af77b670e (diff)
Ethumb: Correct the string representation functions.
Diffstat (limited to 'efl/ethumb')
-rw-r--r--efl/ethumb/efl.ethumb_client.pyx24
1 files changed, 11 insertions, 13 deletions
diff --git a/efl/ethumb/efl.ethumb_client.pyx b/efl/ethumb/efl.ethumb_client.pyx
index 2e4fcc3..14b5f70 100644
--- a/efl/ethumb/efl.ethumb_client.pyx
+++ b/efl/ethumb/efl.ethumb_client.pyx
@@ -162,7 +162,7 @@ cdef class Client:
162 self._on_connect_callback = None 162 self._on_connect_callback = None
163 self._on_server_die_callback = None 163 self._on_server_die_callback = None
164 164
165 def __str__(self): 165 def __repr__(self):
166 f, k = self.file 166 f, k = self.file
167 tf, tk = self.thumb_path 167 tf, tk = self.thumb_path
168 w, h = self.size 168 w, h = self.size
@@ -171,18 +171,16 @@ cdef class Client:
171 aspect = ("KEEP", "IGNORE", "CROP")[self.aspect] 171 aspect = ("KEEP", "IGNORE", "CROP")[self.aspect]
172 if self.aspect == 2: 172 if self.aspect == 2:
173 aspect = "CROP[%f, %f]" % self.crop 173 aspect = "CROP[%f, %f]" % self.crop
174 return ("%s(file=(%r, %r), thumb=(%r, %r), exists=%s, size=%dx%d, " 174 return (
175 "format=%s, aspect=%s, quality=%d, compress=%d, " 175 "<%s(obj=%#x, file=(%r, %r), thumb=(%r, %r), exists=%s, "
176 "directory=%r, category=%r)") % \ 176 "size=%dx%d, format=%s, aspect=%s, quality=%d, compress=%d, "
177 (self.__class__.__name__, f, k, tf, tk, self.thumb_exists(), 177 "directory=%r, category=%r)>"
178 w, h, format, aspect, self.quality, self.compress, 178 ) % (
179 self.directory, self.category) 179 type(self).__name__, <uintptr_t><void *>self, f, k,
180 180 tf, tk, self.thumb_exists(),
181 def __repr__(self): 181 w, h, format, aspect, self.quality, self.compress,
182 f, k = self.file 182 self.directory, self.category
183 tf, tk = self.thumb_path 183 )
184 return "%s(obj=%#x, file=(%r, %r), thumb=(%r, %r), exists=%s)" % \
185 (self.__class__.__name__, <uintptr_t><void *>self, f, k, tf, tk, self.thumb_exists())
186 184
187 def on_server_die_callback_set(self, func, *args, **kargs): 185 def on_server_die_callback_set(self, func, *args, **kargs):
188 """Function to call when server dies. 186 """Function to call when server dies.