Skip to content

Commit

Permalink
Any return type for result (#103)
Browse files Browse the repository at this point in the history
It is safer to check for None, in case the function returns non-standard python variable (ex numpy of tensorflow)
Should fix #102
  • Loading branch information
ltetrel authored Apr 30, 2020
1 parent 4cab77f commit dd4dbc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vprof/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def run(func, options, args=(), kwargs={}, host='localhost', port=8000): # pyli

result = None
for prof in run_stats:
if not result:
if result is None:
result = run_stats[prof]['result']
del run_stats[prof]['result'] # Don't send result to remote host

Expand Down

0 comments on commit dd4dbc8

Please sign in to comment.