diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-06-01 17:57:19 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-06-01 17:57:19 +0000 |
commit | 0725caa98c053f6a6b1053648c36f120c9801b33 (patch) | |
tree | 3845da6422a6e8421a8eadfd5df2cb6c04495da7 /src/sbin | |
parent | 6d28dc16d88fac03acb13f2d3aa7fccc2e2020ff (diff) | |
download | bcfg2-0725caa98c053f6a6b1053648c36f120c9801b33.tar.gz bcfg2-0725caa98c053f6a6b1053648c36f120c9801b33.tar.bz2 bcfg2-0725caa98c053f6a6b1053648c36f120c9801b33.zip |
handle xml parse failure.
(Logical change 1.229)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@955 ce84e21b-d406-0410-9b95-82705330c041
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 15cfcf6c8..734a16821 100644 --- a/src/sbin/bcfg2 +++ b/src/sbin/bcfg2 @@ -112,7 +112,12 @@ if __name__ == '__main__': except IOError: print "failed to write config cache file %s" % (setup['cache']) - cfg = XML(r) + try: + cfg = XML(r) + except: + print "got error from server" + raise SystemExit, 1 + if cfg.tag == 'error': print "got error from server" raise SystemExit, 1 |