diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-09-02 15:33:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-09-02 15:40:35 -0400 |
commit | 03040903e677172ce46319b83f9d00bafb33fad7 (patch) | |
tree | 042fcc3be301634ee20527ed268685fdb8b641cb /scripts | |
parent | 3a2964577e397319fe89cbba5393818beab665bd (diff) | |
download | tor-03040903e677172ce46319b83f9d00bafb33fad7.tar.gz tor-03040903e677172ce46319b83f9d00bafb33fad7.zip |
practracker: handle empty files.
Previously practracker would fail on a file with no lines.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/maint/practracker/metrics.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/maint/practracker/metrics.py b/scripts/maint/practracker/metrics.py index 9f69b2ac1f..4c62bc2425 100644 --- a/scripts/maint/practracker/metrics.py +++ b/scripts/maint/practracker/metrics.py @@ -8,6 +8,7 @@ import re def get_file_len(f): """Get file length of file""" + i = -1 for i, l in enumerate(f): pass return i + 1 |