diff options
Diffstat (limited to 'src/sbin')
-rw-r--r-- | src/sbin/bcfg2 | 7 |
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 |