summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-12-07 00:12:31 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-12-07 00:12:31 +0000
commit2769d83e0b648d1d623b4a1648973d6c32945b13 (patch)
tree369f7e55fa0640939bad76998807dede33785fa2 /src/sbin
parentca9bc79f042ad01bcd6ced351e4dd7aef5196376 (diff)
downloadbcfg2-2769d83e0b648d1d623b4a1648973d6c32945b13.tar.gz
bcfg2-2769d83e0b648d1d623b4a1648973d6c32945b13.tar.bz2
bcfg2-2769d83e0b648d1d623b4a1648973d6c32945b13.zip
Fix error reporting for parse failures
Fix comment printing for etc/metadata.xml Add a better error message for client communication bootstrapping failures git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1615 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rw-r--r--src/sbin/bcfg27
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index a2d0634f5..7a7eb7f77 100644
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -97,7 +97,12 @@ if __name__ == '__main__':
cf = ConfigParser()
cf.read('/etc/bcfg2.conf')
- location = cf.get("components", "bcfg2")
+ try:
+ location = cf.get("components", "bcfg2")
+ except (NoSectionError, NoOptionError):
+ print "Can't find bcfg2 server location to connect to"
+ print "Check /etc/bcfg2.conf"
+ raise SystemExit, 1
proxy = ServerProxy(location)
user = 'root'
retries = 0