mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
practracker: handle empty files.
Previously practracker would fail on a file with no lines.
This commit is contained in:
parent
3a2964577e
commit
03040903e6
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue