Skip to content
This repository has been archived by the owner on Dec 16, 2017. It is now read-only.

Commit

Permalink
Merge branch 'naumzerg-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Maxwell committed Jun 22, 2014
2 parents ffed12b + 28e5350 commit f444d22
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions malutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ def get_URL(url):
try:
response = urllib2.urlopen(url.encode("utf8"))
return response
except (ValueError, urllib2.URLError) as e:
except urllib2.URLError as e:
if hasattr(e, 'reason'):
logging.warning('urlopen() returned error %s\n', e.reason)
elif hasattr(e, 'code'):
logging.warning('Server couldn\'t fulfill request: %s\n', e.code)
else:
logging.warning('Opened %s with response code %s', url,
response.getcode())
return False
except ValueError as e:
logging.warning('urlopen() returned error %s\n', e)

return False


def parse(url):
Expand Down

0 comments on commit f444d22

Please sign in to comment.