Skip to content

Commit

Permalink
improv: prefer selectively importing from zipfile
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Nov 24, 2024
1 parent 1154dcd commit debff2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import sys
import threading
import time
import zipfile
from _ctypes import CFuncPtr
from argparse import Namespace
from collections.abc import MutableMapping
from concurrent.futures import Future, ThreadPoolExecutor
from contextlib import suppress
from ctypes import CDLL, c_int, c_ulong
from errno import ENETUNREACH
from zipfile import Path as ZipPath

try:
from importlib.resources.abc import Traversable
Expand Down Expand Up @@ -758,7 +758,7 @@ def umu_run(args: Namespace | tuple[str, list[str]]) -> int:
root = Path(__file__).resolve(strict=True).parent
except NotADirectoryError:
# Raised when within a zipapp. Try again in non-strict mode
root = zipfile.Path(
root = ZipPath(
Path(__file__).resolve().parent.parent, Path(__file__).parent.name
)

Expand Down

0 comments on commit debff2f

Please sign in to comment.