Skip to content

Commit

Permalink
Replaced mktemp with mkstemp
Browse files Browse the repository at this point in the history
  • Loading branch information
fazledyn-or committed Oct 23, 2023
1 parent ee9a5ba commit 9a040ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pabotprofiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import sys
import tempfile

profile_results = tempfile.mktemp(suffix=".out", prefix="pybot-profile", dir=".")
fd, profile_results = tempfile.mkstemp(suffix=".out", prefix="pybot-profile", dir=".")
cProfile.run("main(sys.argv[1:])", profile_results)
stats = pstats.Stats(profile_results)
stats.sort_stats("cumulative").print_stats(50)
os.close(fd)
os.remove(profile_results)

0 comments on commit 9a040ef

Please sign in to comment.