magalbraith / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

Patch to close URL file handle #85

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As far as I can tell, the file handle returned by the opener was never being 
closed (the close method on the opener object does something else, as far as 
I can tell).  Also, it wasn't being closed in the face of an exception being 
thrown, which is a pretty common occurrence given that Twitter returns, e.g., 
400's in the case of a bad password, etc.

This patch fixes those issues, as far as I can tell.  The twitter_test.py 
file still runs fine and I tried it out in basic usage, but haven't tested 
super-extensively.

Original issue reported on code.google.com by jacob...@gmail.com on 30 Jul 2009 at 5:15

Attachments: