Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Fix /issues/856

* Update network_timezones.py
  • Loading branch information
fernandog committed Aug 8, 2016
1 parent 90e9d72 commit eb5e77f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sickbeard/network_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ def update_network_dict():
"""Update timezone information from Medusa repositories"""

url = 'https://cdn.pymedusa.com/sb_network_timezones/network_timezones.txt'
url_data = helpers.getURL(url, session=helpers.make_session(), returns='text')
if not url_data:
url_data = helpers.getURL(url, session=helpers.make_session(), returns='response')
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 eb5e77f

Please sign in to comment.