prevent circular dependencies

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-11-03 00:25:06 +01:00
parent 7d0238682b
commit c58ec7e4ef

View file

@ -187,4 +187,6 @@ class Emulator(object):
__object_name = os.environ.get('__object_name', None)
if __object_name:
_object = self.cdist_object.object_from_name(__object_name)
_object.requirements.append(self.cdist_object.name)
# prevent circular dependencies
if not _object.name in self.cdist_object.requirements:
_object.requirements.append(self.cdist_object.name)