Browse Source

Removed unused code, added space after comma

master
rune 11 months ago
parent
commit
7ac8ba3432
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      py-dyndns.py

+ 1
- 3
py-dyndns.py View File

@@ -100,16 +100,14 @@ def addnewdomin(newdata):
if response is not 'Fail':
logging.info('Success! Domain %s updated with ID: %s', newdata['add'][0], response['domain_record']['id'])
domainid = str(response['domain_record']['id'])
print(newdata['add'][0])
section = str(newdata['add'][0])
section = section.strip("[']")
print(section)
config[section] = {
'subdomainid': str(domainid)
}
with open('config.ini', 'w') as f:
config.write(f)
print('Domain ' + str(section) + ' added with ID ' + str(domainid) + 'and config.ini updated!')
print('Domain ' + str(section) + ' added with ID ' + str(domainid) + ' and config.ini updated!')
else:
print('ERROR! Domain not added!')


Loading…
Cancel
Save