Code Review
/
nfvbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
behave_tests: add unit tests for TestAPI client
[nfvbench.git]
/
nfvbench
/
nfvbench.py
diff --git
a/nfvbench/nfvbench.py
b/nfvbench/nfvbench.py
index
0719247
..
891b2bb
100644
(file)
--- a/
nfvbench/nfvbench.py
+++ b/
nfvbench/nfvbench.py
@@
-721,7
+721,7
@@
def main():
sys.exit(0)
if opts.summary:
sys.exit(0)
if opts.summary:
- with open(opts.summary) as json_data:
+ with open(opts.summary
, encoding="utf-8"
) as json_data:
result = json.load(json_data)
if opts.user_label:
result['config']['user_label'] = opts.user_label
result = json.load(json_data)
if opts.user_label:
result['config']['user_label'] = opts.user_label
@@
-736,7
+736,8
@@
def main():
# dump the contents of the trex log file
if opts.show_trex_log:
try:
# 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', encoding="utf-8") as trex_log_file:
+ print(trex_log_file.read(), end="")
except FileNotFoundError:
print("No TRex log file found!")
sys.exit(0)
except FileNotFoundError:
print("No TRex log file found!")
sys.exit(0)