diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-03-23 19:44:12 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-03-23 19:44:12 +0000 |
commit | bd12f736a1ec1258c38e958935915e3cb1709646 (patch) | |
tree | bc3c85c65508004570012a656c9e8e2dc650cd69 /src/sbin | |
parent | 3a6a648fa9108e1a4f3f8e2b080622b2096b28a9 (diff) | |
download | bcfg2-bd12f736a1ec1258c38e958935915e3cb1709646.tar.gz bcfg2-bd12f736a1ec1258c38e958935915e3cb1709646.tar.bz2 bcfg2-bd12f736a1ec1258c38e958935915e3cb1709646.zip |
* Print error message and exit if no component location information exists in the config file (fixes Ticket #34)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1809 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-x | src/sbin/bcfg2 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2 index 5b9270595..5afa9d7e5 100755 --- a/src/sbin/bcfg2 +++ b/src/sbin/bcfg2 @@ -7,7 +7,11 @@ from ConfigParser import ConfigParser, NoSectionError, NoOptionError from lxml.etree import Element, XML, tostring, XMLSyntaxError import getopt, logging, os, signal, sys, tempfile, time, traceback, xmlrpclib -import Bcfg2.Client.Proxy, Bcfg2.Logging +try: + import Bcfg2.Client.Proxy, Bcfg2.Logging +except KeyError: + print "Could not read options from configuration file" + raise SystemExit, 1 def cb_sigint_handler(signum, frame): '''Exit upon CTRL-C''' |