Skip to content

Commit 88f0aae

Browse files
authored
Merge pull request #314 from vijay120/bug_fix/printing
Fixed write bug
2 parents 3ac2559 + df4304f commit 88f0aae

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
@@ -404,7 +404,7 @@ def memory_usage(proc=-1, interval=.1, timeout=None, timestamps=False,
404404
proc.pid, backend, timestamps=timestamps,
405405
include_children=include_children)
406406

407-
if stream is not None:
407+
if mem_usage and stream is not None:
408408
stream.write("MEM {0:.6f} {1:.4f}\n".format(*mem_usage))
409409

410410
# Write children to the stream file

0 commit comments

Comments
 (0)