Message213987
> There is at least one other place (do_break) where this same problem could crop up. Also in do_retval. And the exception is silently ignored in do_p and do_pp when repr() fails, which is not correct. A solution could be to have a message_safe method to be used in such cases. For example, substitute in do_args: self.message('%s = %r' % (name, dict[name])) with: self.message_safe('%s = %r', name, dict[name]) def message_safe(self, fmt, *args): try: print(fmt % args, file=self.stdout) except Exception: exc_info = sys.exc_info()[:2] self.error(traceback.format_exception_only(*exc_info)[-1].strip()) | |
| Date | User | Action | Args | | 2014-03-18 16:40:04 | xdegaye | set | recipients: + xdegaye, jneb, r.david.murray | | 2014-03-18 16:40:04 | xdegaye | set | messageid: <1395160804.68.0.938999993762.issue20853@psf.upfronthosting.co.za> | | 2014-03-18 16:40:04 | xdegaye | link | issue20853 messages | | 2014-03-18 16:40:04 | xdegaye | create | | |