diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-08-01 14:45:17 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-08-01 14:45:17 +0000 |
commit | 74aed9bd721655e8ddad42e4acac31d770354030 (patch) | |
tree | f0bbb727d6059c528163d1f91cc947e9a621ed0f /src/sbin/bcfg2-server | |
parent | 14a4b057d24a2b21adfa4baa85480a47f9fb9884 (diff) | |
download | bcfg2-74aed9bd721655e8ddad42e4acac31d770354030.tar.gz bcfg2-74aed9bd721655e8ddad42e4acac31d770354030.tar.bz2 bcfg2-74aed9bd721655e8ddad42e4acac31d770354030.zip |
Add extra case for MetadataRuntimeErrors
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2021 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-server')
-rwxr-xr-x | src/sbin/bcfg2-server | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server index e78312e08..aeec85cbf 100755 --- a/src/sbin/bcfg2-server +++ b/src/sbin/bcfg2-server @@ -3,8 +3,9 @@ '''The XML-RPC Bcfg2 Server''' __revision__ = '$Revision$' +import Bcfg2.Server.Metadata + from Bcfg2.Server.Core import Core, CoreInitError -from Bcfg2.Server.Metadata import MetadataConsistencyError from xmlrpclib import Fault from lxml.etree import XML, Element, tostring @@ -133,7 +134,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component): for probe in generator.GetProbes(meta): resp.append(probe) return tostring(resp) - except MetadataConsistencyError: + except Bcfg2.Server.Metadata.MetadataConsistencyError: warning = 'metadata consistency error' self.logger.warning(warning) raise Fault, (6, warning) @@ -159,7 +160,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component): client = self.resolve_client(address[0]) try: self.Core.metadata.set_profile(client, profile) - except MetadataConsistencyError: + except (Bcfg2.Server.Metadata.MetadataConsistencyError, Bcfg2.Server.Metadata.MetadataRuntimeError): warning = 'metadata consistency error' self.logger.warning(warning) raise Fault, (6, warning) |