CDIST_ALLOW_OVERRIDE -> CDIST_OVERRIDE as requested by nico

This commit is contained in:
Daniel Heule 2014-02-06 16:03:07 +01:00
commit 52e2017d8f
2 changed files with 4 additions and 4 deletions

View file

@ -145,14 +145,14 @@ class Emulator(object):
if value is not None:
self.parameters[key] = value
if self.cdist_object.exists and not 'CDIST_ALLOW_OVERRIDE' in os.environ:
if self.cdist_object.exists and not 'CDIST_OVERRIDE' in os.environ:
if self.cdist_object.parameters != self.parameters:
raise cdist.Error("Object %s already exists with conflicting parameters:\n%s: %s\n%s: %s"
% (self.cdist_object.name, " ".join(self.cdist_object.source), self.cdist_object.parameters, self.object_source, self.parameters)
)
else:
if self.cdist_object.exists:
self.log.debug('Object %s override forced with CDIST_ALLOW_OVERRIDE',self.cdist_object.name)
self.log.debug('Object %s override forced with CDIST_OVERRIDE',self.cdist_object.name)
self.cdist_object.create(True)
else:
self.cdist_object.create()