From bafaf8ff549071460653f91d81fe49231c0de216 Mon Sep 17 00:00:00 2001
From: "Mads M. Pedersen" <mmpe@dtu.dk>
Date: Thu, 23 Feb 2017 08:10:25 +0100
Subject: [PATCH] glob with named arguments in simulation/cluster resource

---
 wetb/hawc2/simulation_resources.py           | 5 +++--
 wetb/utils/cluster_tools/cluster_resource.py | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/wetb/hawc2/simulation_resources.py b/wetb/hawc2/simulation_resources.py
index b9650f8d..85b4a497 100644
--- a/wetb/hawc2/simulation_resources.py
+++ b/wetb/hawc2/simulation_resources.py
@@ -261,8 +261,9 @@ class PBSClusterSimulationHost(SimulationHost):
 
     hawc2exe = property(lambda self : os.path.basename(self.sim.hawc2exe))
 
-    def glob(self, *args,**kwargs):
-        return self.ssh.glob(*args,**kwargs)
+    def glob(self, filepattern, cwd="", recursive=False):
+        return self.ssh.glob(filepattern, cwd, recursive)
+    
     def get_datetime(self):
         v, out, err = self.ssh.execute('date "+%Y,%m,%d,%H,%M,%S"')
         if v == 0:
diff --git a/wetb/utils/cluster_tools/cluster_resource.py b/wetb/utils/cluster_tools/cluster_resource.py
index 55206763..5c128cc5 100644
--- a/wetb/utils/cluster_tools/cluster_resource.py
+++ b/wetb/utils/cluster_tools/cluster_resource.py
@@ -112,6 +112,9 @@ class SSHPBSClusterResource(Resource):
         Resource.__init__(self, min_cpu, min_free)
         self.ssh = sshclient
         self.resource_lock = threading.Lock()
+        
+    def glob(self, filepattern, cwd="", recursive=False):
+        return self.ssh.glob(filepattern, cwd, recursive)
 
     @property
     def host(self):
-- 
GitLab