Skip to content

Commit f315e19

Browse files
author
Chris
committed
make sure file is opened in rb
1 parent 0587774 commit f315e19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

memory_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ def exec_with_profiler(filename, profiler, backend, passed_args=[]):
11641164
try:
11651165
if _backend == 'tracemalloc' and has_tracemalloc:
11661166
tracemalloc.start()
1167-
with open(filename) as f:
1167+
with open(filename, 'rb') as f:
11681168
exec(compile(f.read(), filename, 'exec'), ns, ns)
11691169
finally:
11701170
if has_tracemalloc and tracemalloc.is_tracing():

0 commit comments

Comments
 (0)