From 0dd38f75c28a8745259b1086a5e46e7d040edfc5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Oct 2011 02:46:28 +0200 Subject: [PATCH] remove leading / from object_id of requirement Signed-off-by: Nico Schottelius --- lib/cdist/emulator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cdist/emulator.py b/lib/cdist/emulator.py index a5e9d306..3aa8ab14 100644 --- a/lib/cdist/emulator.py +++ b/lib/cdist/emulator.py @@ -156,8 +156,8 @@ class Emulator(object): except IndexError: # no object id, must be singleton requirement_object_id = 'singleton' - if requirement_object_id.startswith('/'): - raise IllegalRequirementError(requirement, 'requirements object_id may not start with /') + + requirement_object_id = requirement_object_id.lstrip('/') self.log.debug("Recording requirement: %s -> %s" % (self.cdist_object.path, requirement)) self.cdist_object.requirements.append(requirement)