Skip to content

Commit

Permalink
Quick nuitka fix (#2008)
Browse files Browse the repository at this point in the history
* Add try block to avoid Nuitka issue

This is a tiny fix to get around a very dumb issue that Nuitka causes.

* made exception more accurate

* fixed typo
  • Loading branch information
DragonMoffon committed Mar 3, 2024
1 parent 1856d30 commit 5c841c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arcade/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ def resolve(path: Union[str, Path]) -> Path:
else:
path = Path(path)

try:
path = Path(path.resolve(strict=True))
except AttributeError:
# WARNING: This is due to an issue caused by Nuitka overriding strings into janky path object
path = Path(path.absolute())

# Always return absolute paths
# Check for the existence of the file and provide useful feedback to
# avoid deep stack trace into pathlib
Expand Down

0 comments on commit 5c841c3

Please sign in to comment.