only list type explorers if there are any; only transfer type explorers if there are ant
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
d02b8d9d30
commit
08d98ac389
1 changed files with 9 additions and 5 deletions
|
@ -95,10 +95,14 @@ class Explorer(object):
|
|||
def list_type_explorer_names(self, cdist_type):
|
||||
"""Return a list of explorer names for the given type."""
|
||||
source = os.path.join(self.local.type_path, cdist_type.explorer_path)
|
||||
try:
|
||||
return os.listdir(source)
|
||||
except EnvironmentError:
|
||||
return []
|
||||
|
||||
def transfer_type_explorers(self, cdist_type):
|
||||
"""Transfer the type explorers for the given type to the remote side."""
|
||||
if cdist_type.explorers:
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue