mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
check_argparse: fix bare except error
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -5,13 +5,6 @@ import pandas as pd
|
||||
import argparse
|
||||
|
||||
|
||||
def get_tag(x, tag):
|
||||
try:
|
||||
return x[tag]
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="check_argparse.py",
|
||||
@@ -48,7 +41,9 @@ def main():
|
||||
'description',
|
||||
'epilog',
|
||||
'usage']:
|
||||
df[tag] = [get_tag(x, tag) for x in df['results']]
|
||||
for result in df['results']:
|
||||
if tag in result:
|
||||
df[tag] = df['results'][tag]
|
||||
df['details'] = df['description'] + df['epilog'] + df['usage']
|
||||
df.to_csv(args.output + '.csv', index=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user