mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +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
@ -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…
Reference in New Issue
Block a user