diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py index fe4d57361..fb7455a4c 100644 --- a/src/lib/Server/Plugins/Metadata.py +++ b/src/lib/Server/Plugins/Metadata.py @@ -468,7 +468,12 @@ class Metadata(Bcfg2.Server.Plugin.Plugin, if client in self.clients: self.logger.info("Changing %s group from %s to %s" % (client, self.clients[client], profile)) cli = self.clientdata_original.xpath('.//Client[@name="%s"]' % (client)) - cli[0].set('profile', profile) + if len(cli) > 0: + cli[0].set('profile', profile) + else: + """Try to find the client in included files""" + self.logger.error("Metadata: Unable to update profile for client %s. Use of Xinclude?" % client) + raise MetadataConsistencyError else: self.logger.info("Creating new client: %s, profile %s" % \ (client, profile)) |