Skip to content

Commit effc274

Browse files
committed
check spinner function origin by matching suffix
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]>
1 parent aa73aa7 commit effc274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

alive_progress/core/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _input(x):
4848
if isinstance(x, FunctionType):
4949
func_file, _ = os.path.splitext(module_lookup.__file__)
5050
if x.__code__.co_name == inner_name \
51-
and os.path.splitext(x.__code__.co_filename)[0] == func_file:
51+
and func_file.endswith(os.path.splitext(x.__code__.co_filename)[0]):
5252
return x
5353
return ERROR
5454

0 commit comments

Comments
 (0)