mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 04:07:52 +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
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def get_tag(x, tag):
|
|
||||||
try:
|
|
||||||
return x[tag]
|
|
||||||
except:
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog="check_argparse.py",
|
prog="check_argparse.py",
|
||||||
@@ -48,7 +41,9 @@ def main():
|
|||||||
'description',
|
'description',
|
||||||
'epilog',
|
'epilog',
|
||||||
'usage']:
|
'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['details'] = df['description'] + df['epilog'] + df['usage']
|
||||||
df.to_csv(args.output + '.csv', index=False)
|
df.to_csv(args.output + '.csv', index=False)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user