Skip to content

Commit

Permalink
Fix checkVersion getURL to return response and not text
Browse files Browse the repository at this point in the history
  • Loading branch information
labrys committed Jun 27, 2016
1 parent 21262db commit 2955065
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sickbeard/versionChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ def getDBcompare(self):

check_url = 'http://cdn.rawgit.com/{org}/{repo}/{commit}/sickbeard/databases/main_db.py'.format(
org=sickbeard.GIT_ORG, repo=sickbeard.GIT_REPO, commit=cur_hash)
response = helpers.getURL(check_url, session=self.session)
response = helpers.getURL(check_url, session=self.session, returns='response')

if response.status_code == 404:
check_url.replace('main_db.py', 'mainDB.py')
response = helpers.getURL(check_url, session=self.session)
response = helpers.getURL(check_url, session=self.session, returns='response')

match = re.search(r'MAX_DB_VERSION\s=\s(?P<version>\d{2,3})', response.text)
new_branch_db_version = int(match.group('version'))
Expand Down

0 comments on commit 2955065

Please sign in to comment.