diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-02-01 22:09:42 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-02-01 22:09:42 +0000 |
commit | be19429b7230567e7e80ccfde88193ce0f8b5343 (patch) | |
tree | ba2681f846656a0efd0f5401897073a97cd38bfb /src/sbin | |
parent | e720ee83702c61417aa384910e5cf5373233b59c (diff) | |
download | bcfg2-be19429b7230567e7e80ccfde88193ce0f8b5343.tar.gz bcfg2-be19429b7230567e7e80ccfde88193ce0f8b5343.tar.bz2 bcfg2-be19429b7230567e7e80ccfde88193ce0f8b5343.zip |
add better error handing
2005/02/01 11:25:01-06:00 anl.gov!desai
Change mode to -rwxr-xr-x
(Logical change 1.200)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@856 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rw-r--r-- | src/sbin/Bcfg2debug | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sbin/Bcfg2debug b/src/sbin/Bcfg2debug index a5c15b939..9cafea2ce 100644 --- a/src/sbin/Bcfg2debug +++ b/src/sbin/Bcfg2debug @@ -5,7 +5,7 @@ __revision__ = '$Revision$' from sys import argv from time import sleep -from Bcfg2.Server.Core import Core +from Bcfg2.Server.Core import Core, CoreInitError def input(): try: @@ -19,7 +19,11 @@ if __name__ == '__main__': cfile = argv[-1] else: cfile = '/etc/bcfg2.conf' - core = Core(cfile) + try: + core = Core({}, cfile) + except CoreInitError, msg: + print "Core load failed because %s" % msg + raise SystemExit, 1 while core.fam.fm.pending(): while core.fam.fm.pending(): core.fam.HandleEvent() @@ -46,7 +50,7 @@ if __name__ == '__main__': for (key, value) in settings.iteritems(): print "%s --> %s" % (key, value) elif cmd[0] == 'shell': - cmd = '' + cmd = [''] continue elif cmd[0] == 'version': print 'Bcfg2debug v. %s' % __revision__ |