Fix domains parse starting with whitespace
This commit is contained in:
parent
25752c927c
commit
56dbd88889
1 changed files with 3 additions and 2 deletions
|
@ -16,7 +16,7 @@ def publish():
|
|||
|
||||
|
||||
def processNameOp(domain, value):
|
||||
if not value.startswith("{"):
|
||||
if not value.strip().startswith("{"):
|
||||
return False
|
||||
try:
|
||||
data = json.loads(value)
|
||||
|
@ -55,9 +55,10 @@ def processNameOp(domain, value):
|
|||
new_names_raw = json.dumps(names, indent=2, sort_keys=True)
|
||||
if new_names_raw != names_raw:
|
||||
open(names_path, "wb").write(new_names_raw)
|
||||
print "-", domain, "Changed"
|
||||
return True
|
||||
else:
|
||||
print "names not changed"
|
||||
print "-", domain, "Not changed"
|
||||
return False
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue