Commit b4661557 authored by Jelte Jansen's avatar Jelte Jansen

don't store ~/.bind10/default_user.csv if $HOME environment variable isn't set


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1561 e5f2f494-b856-4b98-b285-d166d9295462
parent 4b17dea5
......@@ -163,6 +163,9 @@ class BindCmdInterpreter(Cmd):
cvsfilepath += os.sep + '.bind10' + os.sep
if not os.path.exists(cvsfilepath):
os.mkdir(cvsfilepath, 0o700)
else:
print("Cannot determine location of $HOME. Not storing default user")
return True
cvsfilepath += 'default_user.csv'
csvfile = open(cvsfilepath, 'w')
os.chmod(cvsfilepath, 0o600)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment