Update for python 3.x

This commit is contained in:
Tom Marshall 2021-05-16 05:59:53 +02:00
parent defe336751
commit 1a70ef7247
1 changed files with 2 additions and 2 deletions

4
nc-api
View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# TODO:
# - Add support for TTL, MXPref, ...
@ -86,7 +86,7 @@ def config_load(pathname):
if not os.path.exists(pathname):
raise RuntimeError("Configuration file %s does not exist" % (pathname))
st = os.stat(pathname)
if (st.st_mode & 077) != 0:
if (st.st_mode & 0o077) != 0:
raise RuntimeError("Configuration file %s has incorrect permissions" % (pathname))
config['debug'] = False
config['verbose'] = False