Browse Source

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
Jelte Jansen 15 years ago
parent
commit
b4661557e1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/bin/bindctl/bindcmd.py

+ 3 - 0
src/bin/bindctl/bindcmd.py

@@ -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)