diff options
author | Daniel Golden <dgolden1@gmail.com> | 2015-11-05 14:22:00 -0800 |
---|---|---|
committer | Daniel Golden <dgolden1@gmail.com> | 2015-11-05 14:26:37 -0800 |
commit | 7f49d80a83c9314dd10d3ec18e77226fca6c3b62 (patch) | |
tree | e5245e05fd3e4b584391b2ba3915178648904dba /tools | |
parent | 0ec116e39c1433feaf9756cd2651c51d810fcbc6 (diff) | |
download | caffeonacl-7f49d80a83c9314dd10d3ec18e77226fca6c3b62.tar.gz caffeonacl-7f49d80a83c9314dd10d3ec18e77226fca6c3b62.tar.bz2 caffeonacl-7f49d80a83c9314dd10d3ec18e77226fca6c3b62.zip |
Don't attempt to write CSV if there are no lines to write
This can happen if, e.g., testing never occurs in the log
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/extra/parse_log.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/extra/parse_log.py b/tools/extra/parse_log.py index 48f9bee0..bb9b65ad 100755 --- a/tools/extra/parse_log.py +++ b/tools/extra/parse_log.py @@ -149,6 +149,11 @@ def write_csv(output_filename, dict_list, delimiter, verbose=False): """Write a CSV file """ + if not dict_list: + if verbose: + print('Not writing %s; no lines to write' % output_filename) + return + dialect = csv.excel dialect.delimiter = delimiter |