remove leading / from object_id of requirement

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
remotes/origin/feature_files_export
Nico Schottelius 13 years ago
parent a7a3ee6f19
commit 0dd38f75c2
  1. 4
      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)

Loading…
Cancel
Save