From dcd3bcee3258ef6f8bb55047db08151bf2e72770 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 13 Feb 2012 07:57:51 +0100 Subject: [PATCH] use the great method object_from_name() in emulator Signed-off-by: Nico Schottelius --- lib/cdist/emulator.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/cdist/emulator.py b/lib/cdist/emulator.py index 8174b38f..64773334 100644 --- a/lib/cdist/emulator.py +++ b/lib/cdist/emulator.py @@ -154,15 +154,7 @@ class Emulator(object): if len(requirement) == 0: continue - requirement_type_name, requirement_object_id = core.CdistObject.split_name(requirement) - # Instantiate type which fails if type does not exist - requirement_type = core.CdistType(self.type_base_path, - requirement_type_name) - - # Instantiate object, which fails if object id is broken - requirement_object = core.CdistObject(requirement_type, - self.object_base_path, requirement_object_id) - + self.cdist_object.object_from_name(requirement) self.log.debug("Recording requirement: " + requirement) self.cdist_object.requirements.append(requirement)