From 097b4ea6ada2bd55c0750429218a43871b80f413 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 13 Feb 2012 07:50:11 +0100 Subject: [PATCH] :%s/self.type/self.cdist_type/g Signed-off-by: Nico Schottelius --- lib/cdist/core/cdist_object.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/cdist/core/cdist_object.py b/lib/cdist/core/cdist_object.py index 81b7e7e9..e7ea7a9f 100644 --- a/lib/cdist/core/cdist_object.py +++ b/lib/cdist/core/cdist_object.py @@ -110,20 +110,20 @@ class CdistObject(object): raise IllegalObjectIdError(self.object_id, 'object_id may not contain //') # If no object_id and type is not singleton => error out - if not self.object_id and not self.type.is_singleton: + if not self.object_id and not self.cdist_type.is_singleton: raise IllegalObjectIdError(self.object_id, "Missing object_id and type is not a singleton.") def __init__(self, cdist_type, base_path, object_id=None): - self.type = cdist_type # instance of Type + self.cdist_type = cdist_type # instance of Type self.base_path = base_path self.object_id = object_id self.sanitise_object_id() self.validate_object_id() - self.name = self.join_name(self.type.name, self.object_id) - self.path = os.path.join(self.type.path, self.object_id, OBJECT_MARKER) + self.name = self.join_name(self.cdist_type.name, self.object_id) + self.path = os.path.join(self.cdist_type.path, self.object_id, OBJECT_MARKER) self.absolute_path = os.path.join(self.base_path, self.path) self.code_local_path = os.path.join(self.path, "code-local") self.code_remote_path = os.path.join(self.path, "code-remote") @@ -138,10 +138,10 @@ class CdistObject(object): .object_from_name('__other/object') -> """ - type_path = self.type.base_path + type_path = self.cdist_type.base_path base_path = self.base_path type_name, object_id = self.split_name(object_name) - return self.__class__(self.type.__class__(type_path, type_name), base_path, object_id=object_id) + return self.__class__(self.cdist_type.__class__(type_path, type_name), base_path, object_id=object_id) def __repr__(self): return '' % self.name