Message172087
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 be simplified to the following?
try:
<do some writing>
except Exception:
self.handleError(record)
I.e. instead of manually catching and re-raising a few BaseExceptions, just don't catch anything that derives from BaseException but not from Exception?
(I noticed because we have an internal clone of this class that occasionally gets augmented with yet another base exception that shouldn't be handled. |
|
Date |
User |
Action |
Args |
2012-10-05 14:46:26 | gvanrossum | set | recipients:
+ gvanrossum |
2012-10-05 14:46:26 | gvanrossum | set | messageid: <1349448386.51.0.852233729423.issue16141@psf.upfronthosting.co.za> |
2012-10-05 14:46:26 | gvanrossum | link | issue16141 messages |
2012-10-05 14:46:25 | gvanrossum | create | |
|