Matthew Edwards wrote:
...
> logger = Logger(open(self.filename, 'wb'))
> for packet in self.subjects:
> logger.recv(packet.data)
> logger.file.close()
>
If something goes wrong in the recv() call, the log file will not be
closed with this code (something similar happens later with the reader).
Could you try if things are better when you use try/finally to make sure
that the file is closed:
fp = open(self.filename, 'wb')
try:
logger = Logger(fp)
for packet in self.subjects:
logger.recv(packet.data)
finally:
fp.close()
Hope that helps!
Cheers,
Guido
_______________________________________________
py-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/py-dev