Skip to content

Commit

Permalink
Fix --profile
Browse files Browse the repository at this point in the history
Broken by 0572d49
  • Loading branch information
progval committed Aug 1, 2024
1 parent 10a341c commit bb120ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/limnoria.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ def removePidFile():
if options.profile:
import profile
world.profiling = True
profile.run('run()', '%s-%i.prof' % (nick, time.time()))
profile.runctx('run()',
globals=globals(), locals={**locals(), "run": run},
filename='%s-%i.prof' % (nick, time.time()))
else:
run()

Expand Down

0 comments on commit bb120ed

Please sign in to comment.