Skip to content

Commit

Permalink
check spinner function origin by matching suffix
Browse files Browse the repository at this point in the history
This ensures client apps remain working even after script using ap
is compiled and bundled (e.g. using pyinstaller) and fs root is changed.

Closes: #280

Signed-off-by: Martin Matous <[email protected]>
  • Loading branch information
mmatous committed Oct 23, 2024
1 parent aa73aa7 commit effc274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alive_progress/core/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _input(x):
if isinstance(x, FunctionType):
func_file, _ = os.path.splitext(module_lookup.__file__)
if x.__code__.co_name == inner_name \
and os.path.splitext(x.__code__.co_filename)[0] == func_file:
and func_file.endswith(os.path.splitext(x.__code__.co_filename)[0]):
return x
return ERROR

Expand Down

0 comments on commit effc274

Please sign in to comment.