Skip to content
Snippets Groups Projects
Commit 60cf58ee authored by Hal Simpson's avatar Hal Simpson
Browse files

Changed how Popen is calling parameters, to take care of the case of spaces...

Changed how Popen is calling parameters,  to take care of the case of spaces in passwords and/or user names.
parent f332c019
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ class GOESIMFV283Factory(IMFV283Factory): ...@@ -40,7 +40,7 @@ class GOESIMFV283Factory(IMFV283Factory):
Timeseriesfactory Timeseriesfactory
""" """
def __init__(self, directory=None, getdcpmessages=None, def __init__(self, directory=None, getdcpmessages=None,
password = None, server=None, user=None, **kwargs): password=None, server=None, user=None, **kwargs):
IMFV283Factory.__init__(self, None, **kwargs) IMFV283Factory.__init__(self, None, **kwargs)
self.directory = directory self.directory = directory
self.getdcpmessages = getdcpmessages self.getdcpmessages = getdcpmessages
...@@ -127,10 +127,10 @@ class GOESIMFV283Factory(IMFV283Factory): ...@@ -127,10 +127,10 @@ class GOESIMFV283Factory(IMFV283Factory):
print >> sys.stderr, server print >> sys.stderr, server
proc = subprocess.Popen( proc = subprocess.Popen(
[self.getdcpmessages, [self.getdcpmessages,
'-h ' + server, '-h ', server,
'-u ' + self.user, '-u ', self.user,
'-P ' + self.password, '-P ', self.password,
'-f ' + self.directory + '/' + self.criteria_file_name, '-f ', self.directory + '/' + self.criteria_file_name,
'-t 60', '-t 60',
'-n'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) '-n'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(output, error) = proc.communicate() (output, error) = proc.communicate()
......
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