mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
test_l4: Fix bare except
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -304,12 +304,11 @@ python3 ./test_l4.py
|
|||||||
|
|
||||||
# Create directory
|
# Create directory
|
||||||
if args.report_file is None:
|
if args.report_file is None:
|
||||||
try:
|
if os.path.isdir('/home/lanforge/report-data'):
|
||||||
homedir = str(datetime.datetime.now().strftime("%Y-%m-%d-%H-%M")).replace(':',
|
homedir = str(datetime.datetime.now().strftime("%Y-%m-%d-%H-%M")).replace(':', '-') + 'test_l4'
|
||||||
'-') + 'test_l4'
|
|
||||||
path = os.path.join('/home/lanforge/report-data/', homedir)
|
path = os.path.join('/home/lanforge/report-data/', homedir)
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
except:
|
else:
|
||||||
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
print('Saving file to local directory')
|
print('Saving file to local directory')
|
||||||
if args.output_format in ['csv', 'json', 'html', 'hdf', 'stata', 'pickle', 'pdf', 'png', 'df', 'parquet',
|
if args.output_format in ['csv', 'json', 'html', 'hdf', 'stata', 'pickle', 'pdf', 'png', 'df', 'parquet',
|
||||||
@@ -349,10 +348,7 @@ python3 ./test_l4.py
|
|||||||
ip_test.build()
|
ip_test.build()
|
||||||
ip_test.start()
|
ip_test.start()
|
||||||
|
|
||||||
try:
|
layer4traffic = ','.join([[*x.keys()][0] for x in ip_test.local_realm.json_get('layer4')['endpoint']])
|
||||||
layer4traffic = ','.join([[*x.keys()][0] for x in ip_test.local_realm.json_get('layer4')['endpoint']])
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
ip_test.cx_profile.monitor(col_names=['name', 'bytes-rd', 'urls/s', 'bytes-wr'],
|
ip_test.cx_profile.monitor(col_names=['name', 'bytes-rd', 'urls/s', 'bytes-wr'],
|
||||||
report_file=rpt_file,
|
report_file=rpt_file,
|
||||||
duration_sec=ip_test.local_realm.parse_time(args.test_duration).total_seconds(),
|
duration_sec=ip_test.local_realm.parse_time(args.test_duration).total_seconds(),
|
||||||
|
|||||||
Reference in New Issue
Block a user