Show More
@@ -191,11 +191,12 b' def warn_format_error(method, self, *args, **kwargs):' | |||
|
191 | 191 | except Exception as e: |
|
192 | 192 | warn("Exception in %s formatter: %s" % (self.format_type, e)) |
|
193 | 193 | return None |
|
194 |
if r is None or isinstance(r, self._return_type) |
|
|
194 | if r is None or isinstance(r, self._return_type) or \ | |
|
195 | (isinstance(r, tuple) and r and isinstance(r[0], self._return_type)): | |
|
195 | 196 | return r |
|
196 | 197 | else: |
|
197 | 198 | warn("%s formatter returned invalid type %s for object: %s" % ( |
|
198 |
self.format_type, type(r), pretty._safe_repr( |
|
|
199 | self.format_type, type(r), pretty._safe_repr(args[0]) | |
|
199 | 200 | )) |
|
200 | 201 | |
|
201 | 202 |
General Comments 0
You need to be logged in to leave comments.
Login now