Message145936
/opt/python3.2/lib/python3.2/site-packages/psutil/_pslinux.py:389: ResourceWarning: unclosed file <_io.FileIO name=7 mode='rb'>
return [x for x in f.read().split('\x00') if x]
I get this while running tests.
The method in question is defined as such:
@wrap_exceptions
def get_process_cmdline(self):
f = open("/proc/%s/cmdline" % self.pid)
try:
# return the args as a list
return [x for x in f.read().split('\x00') if x]
finally:
f.close()
...therefore, I'm closing the file object (in the finally block). |
|
Date |
User |
Action |
Args |
2011-10-19 18:53:48 | giampaolo.rodola | set | recipients:
+ giampaolo.rodola, pitrou |
2011-10-19 18:53:48 | giampaolo.rodola | set | messageid: <1319050428.96.0.600308451611.issue13222@psf.upfronthosting.co.za> |
2011-10-19 18:53:48 | giampaolo.rodola | link | issue13222 messages |
2011-10-19 18:53:47 | giampaolo.rodola | create | |
|