brunobraga/termsaver — Issue #1: urllib without close causes connection reset by peer on Mac
Author: brunobraga
Created: 2012-03-05 10:56:55+00:00
State: open

By running:

$ termsaver quotes4all -v

When it comes time for the loop to reconnect to the internet, it throws the following error:

-----------------

termsaver.quotes4all: Connecting to http://quotes4all.net/rss/360010110/quotes.xml ... (this could take a while)
Oops! Error while trying to fetch from http://quotes4all.net/rss/360010110/quotes.xml. Could not fetch URL, because [Errno 54] Connection reset by peer

===================================
Exception: (UrlException) Could not fetch URL, because [Errno 54] Connection reset by peer
Traceback (most recent call last):
File "/usr/local/bin/termsaver", line 159, in
parse_args(sys.argv[1:])
File "/usr/local/bin/termsaver", line 143, in parse_args
screen().autorun(args[1:])
File "/Library/Python/2.7/site-packages/termsaverlib/screen/base/__init__.py", line 237, in autorun
self._run_cycle()
File "/Library/Python/2.7/site-packages/termsaverlib/screen/base/rssfeed.py", line 238, in _run_cycle
self.doc_xml_string(self.fetch(self.url))
File "/Library/Python/2.7/site-packages/termsaverlib/screen/helper/urlfetcher.py", line 167, in fetch
_("Could not fetch URL, because %s") % e.reason)
UrlException: Could not fetch URL, because [Errno 54] Connection reset by peer

===================================