summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-admin
diff options
context:
space:
mode:
Diffstat (limited to 'src/sbin/bcfg2-admin')
-rwxr-xr-xsrc/sbin/bcfg2-admin5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin
index 94e9cc153..bd70873e7 100755
--- a/src/sbin/bcfg2-admin
+++ b/src/sbin/bcfg2-admin
@@ -118,7 +118,10 @@ def initialize_repo(cfile):
#guess path of ssl key file
keypath = os.path.dirname(os.path.abspath(cfile))
- open(cfile,"w").write(config % ( repo, password, keypath, uri ))
+ try:
+ open(cfile,"w").write(config % ( repo, password, keypath, uri ))
+ except:
+ err_exit("Failed to write bcfg2 config file to %s" % cfile)
#generate the ssl key
print "Now we will generate the ssl key used for secure communitcation"