Skip to content

Commit

Permalink
umu_run: handle potential unreachable network when updating runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Oct 8, 2024
1 parent 637ffde commit 859018e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from pathlib import Path
from pwd import getpwuid
from re import match
from socket import AF_INET, SOCK_DGRAM, gaierror, socket
from socket import AF_INET, SOCK_DGRAM, socket
from subprocess import Popen
from typing import Any

Expand Down Expand Up @@ -819,12 +819,13 @@ def main() -> int: # noqa: D103

try:
future.result()
except gaierror as e:
# Name resolution error in the request to repo.steampowered.com
# At this point, umu was already setup and user is offline
if e.errno != -3:
raise e
log.debug("Name resolution failed")
except OSError as e:
# Name resolution failed or unreachable network error in the
# request to repo.steampowered.com. At this point, umu was already
# setup and user is offline or has an unreliable network connection
if e.errno != -3 and e.errno != ENETUNREACH:
raise
log.debug("Network is unreachable")

# Exit if the winetricks verb is already installed to avoid reapplying it
if env["EXE"].endswith("winetricks") and is_installed_verb(
Expand Down

0 comments on commit 859018e

Please sign in to comment.