Message347667
cgi.FieldStorage has this for its __del__ method:
def __del__(self):
try:
self.file.close()
except AttributeError:
pass
By contrast, __exit__ is missing the exception handler:
def __exit__(self, *args):
self.file.close()
Because self.file isn't populated in every instance of the FieldStorage class, this can cause FieldStorage to fail with AttributeError when used in a with statement. |
|
Date |
User |
Action |
Args |
2019-07-11 10:02:14 | Stefanik Gábor | set | recipients:
+ Stefanik Gábor |
2019-07-11 10:02:14 | Stefanik Gábor | set | messageid: <1562839334.01.0.637880829238.issue37560@roundup.psfhosted.org> |
2019-07-11 10:02:13 | Stefanik Gábor | link | issue37560 messages |
2019-07-11 10:02:13 | Stefanik Gábor | create | |
|