Skip to content

Commit 10319ba

Browse files
authored
Merge pull request #59 from gurgalex/offline
fail version check gracefully when offline
2 parents 6bddd34 + 352ee0e commit 10319ba

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v0.10.1
2+
## Fix
3+
- Program no longer crashes if offline when checking for updates
4+
15
# v0.10.0
26
## change
37
- Reading NPC dialog boxes must now be done manually with the `o` key. The program will till you if there is a dialog box to read

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.0
1+
0.10.1

subot/main.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,12 @@ def run(self):
15091509

15101510
def version_check(config, audio_system):
15111511
current_version = semantic_version.Version(read_version())
1512-
resp = requests.get("https://raw.githubusercontent.com/gurgalex/SiralimAccess/main/VERSION")
1512+
try:
1513+
resp = requests.get("https://raw.githubusercontent.com/gurgalex/SiralimAccess/main/VERSION")
1514+
except requests.exceptions.ConnectionError as e:
1515+
root.info("skipping version check due to connection error")
1516+
return
1517+
15131518
if resp.status_code != 200:
15141519
return
15151520
latest_version = semantic_version.Version(resp.text)

0 commit comments

Comments
 (0)