check_argparse: fix bare except error

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
Matthew Stidham
2021-11-24 13:17:15 -08:00
parent 0749253c4c
commit 978765739c

View File

@@ -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)