[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 vinay_sa...@yahoo.co.uk: -- assignee: - vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16141 ___ ___

[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: do some writing except (KeyboardInterrupt, SystemExit): #pragma: no cover raise except: self.handleError(record) Couldn't this

[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 Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +vinay.sajip stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16141 ___ ___