[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 46889b772442 by Vinay Sajip in branch 'default': Issue #16141: replaced old-style exception handling code in logging with the modern idiom. http://hg.python.org/cpython/rev/46889b772442 -- nosy: +python-dev

[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-08 Thread Vinay Sajip
Changes by Vinay Sajip : -- assignee: -> vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +vinay.sajip stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Couldn't this be simplified to the following? I think this is idiomatic now (since 2.5). There are some places where similar outdated code used. See the attached patch. There are more dubious places in Lib/multiprocessing/managers.py and Lib/asyncore.py.

[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-05 Thread Guido van Rossum
New submission from Guido van Rossum: I just noticed that StreamHandler contains the following fragment in its emit() method: try: except (KeyboardInterrupt, SystemExit): #pragma: no cover raise except: self.handleError(record) Couldn't this be simplified to