From 3cf417fa2bb8152fd0bcef757ce29d3f24649d9c Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Tue, 15 May 2018 12:12:01 +0200 Subject: [PATCH] Fix NameError: name 'cdist_object' is not defined, #662 --- cdist/core/explorer.py | 29 +++++++++++++---------------- docs/changelog | 1 + 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/cdist/core/explorer.py b/cdist/core/explorer.py index 072ca692..874d36f2 100644 --- a/cdist/core/explorer.py +++ b/cdist/core/explorer.py @@ -214,22 +214,19 @@ class Explorer(object): def transfer_type_explorers(self, cdist_type): """Transfer the type explorers for the given type to the remote side.""" - try: - if cdist_type.explorers: - if cdist_type.name in self._type_explorers_transferred: - self.log.trace(("Skipping retransfer of type explorers " - "for: %s"), cdist_type) - else: - source = os.path.join(self.local.type_path, - cdist_type.explorer_path) - destination = os.path.join(self.remote.type_path, - cdist_type.explorer_path) - self.remote.mkdir(destination) - self.remote.transfer(source, destination) - self.remote.run(["chmod", "0700", "%s/*" % (destination)]) - self._type_explorers_transferred.append(cdist_type.name) - except cdist.Error as e: - raise cdist.CdistObjectError(cdist_object, e) + if cdist_type.explorers: + if cdist_type.name in self._type_explorers_transferred: + self.log.trace(("Skipping retransfer of type explorers " + "for: %s"), cdist_type) + else: + source = os.path.join(self.local.type_path, + cdist_type.explorer_path) + destination = os.path.join(self.remote.type_path, + cdist_type.explorer_path) + self.remote.mkdir(destination) + self.remote.transfer(source, destination) + self.remote.run(["chmod", "0700", "%s/*" % (destination)]) + self._type_explorers_transferred.append(cdist_type.name) def transfer_object_parameters(self, cdist_object): """Transfer the parameters for the given object to the remote side.""" diff --git a/docs/changelog b/docs/changelog index 64d2489e..1e3787fd 100644 --- a/docs/changelog +++ b/docs/changelog @@ -6,6 +6,7 @@ next: * New type: __docker_config (Ľubomír Kučera) * New type: __docker_secret (Ľubomír Kučera) * Type __letsencrypt_cert: Rewritten; WARN: breaks backward compatibility (Ľubomír Kučera) + * Core: Fix NameError: name 'cdist_object' is not defined (Darko Poljak) 4.8.4: 2018-04-20 * Documentation, type manpages: Fix spelling (Dmitry Bogatov)