Skip to content

Commit 5e03d93

Browse files
committed
Merge pull request #449 from nipy/bug/FixPopenTypeBug
BUG: subprocess.Popen requres list of arguments to be strings
2 parents 2794721 + 61f6e92 commit 5e03d93

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nipype/pipeline/plugins/pbs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def __init__(self, **kwargs):
3636
super(PBSPlugin, self).__init__(template, **kwargs)
3737

3838
def _is_pending(self, taskid):
39-
proc = subprocess.Popen(["qstat", taskid],
39+
# subprocess.Popen requires taskid to be a string
40+
proc = subprocess.Popen(["qstat", str(taskid)],
4041
stdout=subprocess.PIPE,
4142
stderr=subprocess.PIPE)
4243
_, e = proc.communicate()

nipype/pipeline/plugins/sge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def __init__(self, **kwargs):
3737
super(SGEPlugin, self).__init__(template, **kwargs)
3838

3939
def _is_pending(self, taskid):
40-
proc = subprocess.Popen(["qstat", '-j', taskid],
40+
# subprocess.Popen requires taskid to be a string
41+
proc = subprocess.Popen(["qstat", '-j', str(taskid)],
4142
stdout=subprocess.PIPE,
4243
stderr=subprocess.PIPE)
4344
o, _ = proc.communicate()

0 commit comments

Comments
 (0)