Skip to content

Commit

Permalink
Moved up assignment so __profiler_base is always defined. (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
emeryberger authored Aug 31, 2023
1 parent ff083d9 commit f1c843d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scalene/scalene_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ def __init__(
sys.exit(1)

Scalene.__signals.set_timer_signals(arguments.use_virtual_time)
Scalene.__profiler_base = str(os.path.dirname(__file__))
if arguments.pid:
# Child process.
# We need to use the same directory as the parent.
Expand Down Expand Up @@ -798,7 +799,6 @@ def __init__(
sys.executable,
cmdline,
)
Scalene.__profiler_base = str(os.path.dirname(__file__))
# Now create all the files.
for name in Scalene.__all_python_names:
fname = os.path.join(Scalene.__python_alias_dir, name)
Expand Down

0 comments on commit f1c843d

Please # to comment.