Skip to content

Commit

Permalink
use v=500 when version can't be determined
Browse files Browse the repository at this point in the history
  • Loading branch information
jftuga committed Mar 28, 2021
1 parent 8cf2332 commit 354d161
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion version_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def get_latest_local_version(page:str) -> str:
except:
return False

if not len(j):
return "500"

newest = j[0]
# The initial version is different than future versions
if "v560" == newest["name"]:
Expand Down Expand Up @@ -71,7 +74,7 @@ def main():
sys.exit(100)

if int(local_version) >= int(remote_version):
print(f"Local version is newer: remote_version: {remote_version} local_version: {local_version}")
print(f"Local version is newer: local_version: {local_version} remote_version: {remote_version}")
sys.exit(120)

print(f"Remote version is newer: remote_version: {remote_version} local_version: {local_version}")
Expand Down

0 comments on commit 354d161

Please sign in to comment.