Private GIT

Skip to content
Snippets Groups Projects
Commit 4a0caa59 authored by Fernando's avatar Fernando
Browse files

Fix SiCKRAGETV/sickrage-issues/issues/2905

parent 1606ffbf
No related branches found
No related tags found
No related merge requests found
...@@ -164,10 +164,10 @@ class CheckVersion: ...@@ -164,10 +164,10 @@ class CheckVersion:
logger.log(u"We can't proceed with the update. New update has a old DB version. It's not possible to downgrade", logger.ERROR) logger.log(u"We can't proceed with the update. New update has a old DB version. It's not possible to downgrade", logger.ERROR)
return False return False
else: else:
logger.log(u"We can't proceed with the update. Unable to check remote DB version", logger.ERROR) logger.log(u"We can't proceed with the update. Unable to check remote DB version. Error: %s" % result, logger.ERROR)
return False return False
except: except Exception as e:
logger.log(u"We can't proceed with the update. Unable to compare DB version", logger.ERROR) logger.log(u"We can't proceed with the update. Unable to compare DB version. Error: %s" % repr(e), logger.ERROR)
return False return False
def postprocessor_safe(self): def postprocessor_safe(self):
...@@ -199,6 +199,7 @@ class CheckVersion: ...@@ -199,6 +199,7 @@ class CheckVersion:
def getDBcompare(self): def getDBcompare(self):
try: try:
self.updater.need_update()
cur_hash = str(self.updater.get_newest_commit_hash()) cur_hash = str(self.updater.get_newest_commit_hash())
assert len(cur_hash) is 40, "Commit hash wrong length: %s hash: %s" % (len(cur_hash), cur_hash) assert len(cur_hash) is 40, "Commit hash wrong length: %s hash: %s" % (len(cur_hash), cur_hash)
...@@ -216,9 +217,8 @@ class CheckVersion: ...@@ -216,9 +217,8 @@ class CheckVersion:
return 'equal' return 'equal'
else: else:
return 'downgrade' return 'downgrade'
except Exception: except Exception as e:
raise return repr(e)
return 'error'
def find_install_type(self): def find_install_type(self):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment