Skip to content

Commit

Permalink
Update network_timezones.py
Browse files Browse the repository at this point in the history
  • Loading branch information
medariox authored and fernandog committed Aug 8, 2016
1 parent 909e7e7 commit a41d40f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sickbeard/network_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ def update_network_dict():

url = 'https://cdn.pymedusa.com/sb_network_timezones/network_timezones.txt'
url_data = helpers.getURL(url, session=helpers.make_session(), returns='response')
if not url_data:
if not url_data.text:
logger.log(u'Updating network timezones failed, this can happen from time to time. URL: %s' % url, logger.WARNING)
load_network_dict()
return

d = {}
try:
for line in url_data.splitlines():
for line in url_data.text.splitlines():
(key, val) = line.strip().rsplit(u':', 1)
if key is None or val is None:
continue
Expand Down

0 comments on commit a41d40f

Please sign in to comment.