1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-02-02 09:55:52 +00:00

injector: strip trailing '\n' from lines

We don't need a corrupted hashes in db :)
This commit is contained in:
Hidden Z 2010-10-17 18:07:02 +00:00
parent dd498acf04
commit 2858ba6084

View File

@ -27,6 +27,8 @@ for line in f:
if line.find('=') == -1:
print 'Invalid line: %s' % line
continue
# strip trailing '\n'
line = line.rstrip('\n')
entry = line.split('=')
try:
hostname = validate_hostname(entry[0])