Message93536
Ok, I get it, you want f.close() to always succeed, even if the
underlying file descriptor has already been closed.
Well, I so no reason to introduce a helper anyway, the following four
lines are much more readable and explicit:
try:
f.close()
except IOError:
pass |
|
| Date |
User |
Action |
Args |
| 2009-10-04 11:21:29 | pitrou | set | recipients:
+ pitrou, aguiar, ezio.melotti, chuck |
| 2009-10-04 11:21:29 | pitrou | set | messageid: <[email protected]> |
| 2009-10-04 11:21:28 | pitrou | link | issue5395 messages |
| 2009-10-04 11:21:27 | pitrou | create | |
|