Browse Source

add comment ignore

master
R4SAS 7 years ago committed by R4SAS
parent
commit
7b444c3f89
  1. 4
      bin/py-i2phosts-injector

4
bin/py-i2phosts-injector

@ -77,7 +77,9 @@ for line in f: @@ -77,7 +77,9 @@ for line in f:
continue
# strip trailing '\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:
hostname = validate_hostname(entry[0])
base64 = validate_b64hash(entry[1], check_uniq=False) # don't require uniqueness

Loading…
Cancel
Save