mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 04:24:15 +00:00
add comment ignore
This commit is contained in:
parent
c07b087b52
commit
7b444c3f89
@ -77,7 +77,9 @@ for line in f:
|
|||||||
continue
|
continue
|
||||||
# strip trailing '\n'
|
# strip trailing '\n'
|
||||||
line = line.rstrip('\n')
|
line = line.rstrip('\n')
|
||||||
entry = line.split('=', 1)
|
# split and ignore comment after b64hash
|
||||||
|
data = line.split("#!", 1)
|
||||||
|
entry = data[0].split("=", 1)
|
||||||
try:
|
try:
|
||||||
hostname = validate_hostname(entry[0])
|
hostname = validate_hostname(entry[0])
|
||||||
base64 = validate_b64hash(entry[1], check_uniq=False) # don't require uniqueness
|
base64 = validate_b64hash(entry[1], check_uniq=False) # don't require uniqueness
|
||||||
|
Loading…
x
Reference in New Issue
Block a user