Skip to content
Snippets Groups Projects
Commit ca29a67a authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

arguments in run() are now optional (I think we should remove them altogether...

arguments in run() are now optional (I think we should remove them altogether - it's too error prone and is clearly not necessary) + fallback on os.system() if no socket is provided. One more nice idea from Fabrice :-)
parent afc1c66b
No related branches found
No related tags found
No related merge requests found
......@@ -323,13 +323,15 @@ class client :
if t == self._GMSH_STOP :
self.NumSubClients -= 1
def run(self, name, command, arguments):
if not self.socket :
return
def run(self, name, command, arguments=''):
# create command line
if self.action == "check":
msg = [name, command]
cmd = command
else:
msg = [name, command + ' ' + arguments]
cmd = command + ' ' + arguments
if not self.socket :
return os.system(cmd);
msg = [name, cmd]
self._send(self._GMSH_CONNECT, '\0'.join(msg))
self.NumSubClients +=1
self._wait_on_subclients() # makes the subclient blocking
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment