From 2b1c4df8d97686a6c80e1e55c4139b6b2f6bffd6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 7 Oct 2011 09:01:47 +0200 Subject: [PATCH] have explorers been transferred? (type) Signed-off-by: Nico Schottelius --- lib/cdist/core/type.py | 5 ++++- lib/cdist/path.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/cdist/core/type.py b/lib/cdist/core/type.py index 126b4d16..7492659e 100644 --- a/lib/cdist/core/type.py +++ b/lib/cdist/core/type.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -68,6 +69,8 @@ class Type(object): self.__required_parameters = None self.__optional_parameters = None + self.transferred_explorers = False + def __repr__(self): return '' % self.name diff --git a/lib/cdist/path.py b/lib/cdist/path.py index f7d2a8ae..e2d319ef 100644 --- a/lib/cdist/path.py +++ b/lib/cdist/path.py @@ -255,12 +255,12 @@ class Path: # Stays here - FIXME: adjust to type code, loop over types! def transfer_type_explorers(self, type): """Transfer explorers of a type, but only once""" - if type.transferred: + if type.transferred_explorers: log.debug("Skipping retransfer for explorers of %s", type) return else: # Do not retransfer - type.transferred = True + type.transferred_explorers = True # FIXME: Can be explorer_path or explorer_dir, I don't care. src = type.explorer_path()