Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
Fixed socket.error in utils.getLinkData()
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDoctorWho committed Sep 27, 2014
1 parent 09dc445 commit 06c035e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def getLinkData(url, encode=True):
"""
try:
opener = urllib.urlopen(url)
data = opener.read()
except (Exception, error):
return ""
data = opener.read()
if data and encode:
data = data.encode("base64")
return data

0 comments on commit 06c035e

Please sign in to comment.