From 03040903e677172ce46319b83f9d00bafb33fad7 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 2 Sep 2019 15:33:59 -0400 Subject: practracker: handle empty files. Previously practracker would fail on a file with no lines. --- scripts/maint/practracker/metrics.py | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3-54-g00ecf