commit 03040903e677172ce46319b83f9d00bafb33fad7
parent 3a2964577e397319fe89cbba5393818beab665bd
Author: Nick Mathewson <nickm@torproject.org>
Date: Mon, 2 Sep 2019 15:33:59 -0400
practracker: handle empty files.
Previously practracker would fail on a file with no lines.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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