Browse Source

py-i2phosts-fetcher: handle httplib errors when fetching data

pull/1/head
Hidden Z 14 years ago
parent
commit
af60e019f8
  1. 6
      py-i2phosts-fetcher

6
py-i2phosts-fetcher

@ -87,7 +87,11 @@ for source in config['sources']: @@ -87,7 +87,11 @@ for source in config['sources']:
source_hostname, e.code)
continue
# read data from remote and write it to local file
content = resp.read()
try:
content = resp.read()
except:
log.warning('failed to read data from %s', source_hostname)
continue
f = open(filename, 'w')
f.write(content)
f.close()

Loading…
Cancel
Save