Skip to content
Snippets Groups Projects
Commit bafaf8ff authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

glob with named arguments in simulation/cluster resource

parent a3ebd1d7
No related branches found
No related tags found
No related merge requests found
...@@ -261,8 +261,9 @@ class PBSClusterSimulationHost(SimulationHost): ...@@ -261,8 +261,9 @@ class PBSClusterSimulationHost(SimulationHost):
hawc2exe = property(lambda self : os.path.basename(self.sim.hawc2exe)) hawc2exe = property(lambda self : os.path.basename(self.sim.hawc2exe))
def glob(self, *args,**kwargs): def glob(self, filepattern, cwd="", recursive=False):
return self.ssh.glob(*args,**kwargs) return self.ssh.glob(filepattern, cwd, recursive)
def get_datetime(self): def get_datetime(self):
v, out, err = self.ssh.execute('date "+%Y,%m,%d,%H,%M,%S"') v, out, err = self.ssh.execute('date "+%Y,%m,%d,%H,%M,%S"')
if v == 0: if v == 0:
......
...@@ -112,6 +112,9 @@ class SSHPBSClusterResource(Resource): ...@@ -112,6 +112,9 @@ class SSHPBSClusterResource(Resource):
Resource.__init__(self, min_cpu, min_free) Resource.__init__(self, min_cpu, min_free)
self.ssh = sshclient self.ssh = sshclient
self.resource_lock = threading.Lock() self.resource_lock = threading.Lock()
def glob(self, filepattern, cwd="", recursive=False):
return self.ssh.glob(filepattern, cwd, recursive)
@property @property
def host(self): def host(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment