|
|
@ -166,13 +166,15 @@ class CdistObject(object): |
|
|
|
Remove leading and trailing slash (one only) |
|
|
|
Remove leading and trailing slash (one only) |
|
|
|
""" |
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
# Remove leading slash |
|
|
|
# Allow empty object id for singletons |
|
|
|
if self.object_id[0] == '/': |
|
|
|
if self.object_id: |
|
|
|
self.object_id = self.object_id[1:] |
|
|
|
# Remove leading slash |
|
|
|
|
|
|
|
if self.object_id[0] == '/': |
|
|
|
|
|
|
|
self.object_id = self.object_id[1:] |
|
|
|
|
|
|
|
|
|
|
|
# Remove trailing slash |
|
|
|
# Remove trailing slash |
|
|
|
if self.object_id[-1] == '/': |
|
|
|
if self.object_id[-1] == '/': |
|
|
|
self.object_id = self.object_id[:-1] |
|
|
|
self.object_id = self.object_id[:-1] |
|
|
|
|
|
|
|
|
|
|
|
# FIXME: still needed? |
|
|
|
# FIXME: still needed? |
|
|
|
@property |
|
|
|
@property |
|
|
|