Commit 2f3ae305 authored by Florian Fischer's avatar Florian Fischer
Browse files

fix calc_stats filter usage

parent eed34141
......@@ -90,15 +90,15 @@ def main():
data = read_csv(sys.stdin)
elif len(sys.argv) > 2:
print_usage_and_exit()
data_path = Path(sys.argv[1])
if not data_path.exists():
print('Path: {data_path} does not exists')
sys.exit(1)
if data_path.is_file():
with open(data_path, 'r') as data_file:
data = read_csv(data_file)
else:
data_path = Path(sys.argv[1])
if not data_path.exists():
print('Path: {data_path} does not exists')
sys.exit(1)
if data_path.is_file():
with open(data_path, 'r') as data_file:
data = read_csv(data_file)
stats = calc_stats(data)
print(yaml.safe_dump(stats))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment