diff options
Diffstat (limited to 'nfvbench/nfvbench.py')
-rw-r--r-- | nfvbench/nfvbench.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index 0719247..740dca2 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -736,7 +736,8 @@ def main(): # dump the contents of the trex log file if opts.show_trex_log: try: - print(open('/tmp/trex.log').read(), end="") + with open('/tmp/trex.log') as trex_log_file: + print(trex_log_file.read(), end="") except FileNotFoundError: print("No TRex log file found!") sys.exit(0) |