Commit b4661557 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

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

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parent 4b17dea5
...@@ -163,6 +163,9 @@ class BindCmdInterpreter(Cmd): ...@@ -163,6 +163,9 @@ class BindCmdInterpreter(Cmd):
cvsfilepath += os.sep + '.bind10' + os.sep cvsfilepath += os.sep + '.bind10' + os.sep
if not os.path.exists(cvsfilepath): if not os.path.exists(cvsfilepath):
os.mkdir(cvsfilepath, 0o700) os.mkdir(cvsfilepath, 0o700)
print("Cannot determine location of $HOME. Not storing default user")
return True
cvsfilepath += 'default_user.csv' cvsfilepath += 'default_user.csv'
csvfile = open(cvsfilepath, 'w') csvfile = open(cvsfilepath, 'w')
os.chmod(cvsfilepath, 0o600) 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