Update for python 3.x
This commit is contained in:
parent
defe336751
commit
1a70ef7247
4
nc-api
4
nc-api
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - Add support for TTL, MXPref, ...
|
# - Add support for TTL, MXPref, ...
|
||||||
|
@ -86,7 +86,7 @@ def config_load(pathname):
|
||||||
if not os.path.exists(pathname):
|
if not os.path.exists(pathname):
|
||||||
raise RuntimeError("Configuration file %s does not exist" % (pathname))
|
raise RuntimeError("Configuration file %s does not exist" % (pathname))
|
||||||
st = os.stat(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))
|
raise RuntimeError("Configuration file %s has incorrect permissions" % (pathname))
|
||||||
config['debug'] = False
|
config['debug'] = False
|
||||||
config['verbose'] = False
|
config['verbose'] = False
|
||||||
|
|
Loading…
Reference in New Issue