Skip to content

Commit

Permalink
Allow autoupdate to fail (close #314)
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Oct 22, 2021
1 parent c33abb3 commit 0742b17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CurseBreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ def auto_update(self):
os.remove(sys.executable + '.old')
except PermissionError:
pass
payload = requests.get('https://api.github.com/repos/AcidWeb/CurseBreaker/releases/latest',
headers=HEADERS, timeout=5).json()
try:
payload = requests.get('https://api.github.com/repos/AcidWeb/CurseBreaker/releases/latest', headers=HEADERS, timeout=5).json()
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout):
return
if 'name' in payload and 'body' in payload and 'assets' in payload:
remoteversion = payload['name']
changelog = payload['body']
Expand Down

0 comments on commit 0742b17

Please sign in to comment.