Skip to content

Commit 804a8f1

Browse files
authored
Merge pull request #455 from minrk/shlex.quote
pipes.quote is actually shlex.quote
2 parents 91b273a + 1eba34f commit 804a8f1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ipyparallel/apps/launcher.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import copy
66
import logging
77
import os
8-
import pipes
8+
import shlex
99
import stat
1010
import sys
1111
import time
@@ -633,7 +633,7 @@ def find_args(self):
633633
self.ssh_cmd
634634
+ self.ssh_args
635635
+ [self.location]
636-
+ list(map(pipes.quote, self.program + self.program_args))
636+
+ list(map(shlex.quote, self.program + self.program_args))
637637
)
638638

639639
def _send_file(self, local, remote):
@@ -1341,7 +1341,7 @@ class PBSControllerLauncher(PBSLauncher, BatchClusterAppMixin):
13411341
#PBS -N ipcontroller
13421342
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
13431343
"""
1344-
% (' '.join(map(pipes.quote, ipcontroller_cmd_argv)))
1344+
% (' '.join(map(shlex.quote, ipcontroller_cmd_argv)))
13451345
)
13461346

13471347
def start(self):
@@ -1361,7 +1361,7 @@ class PBSEngineSetLauncher(PBSLauncher, BatchClusterAppMixin):
13611361
#PBS -N ipengine
13621362
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
13631363
"""
1364-
% (' '.join(map(pipes.quote, ipengine_cmd_argv)))
1364+
% (' '.join(map(shlex.quote, ipengine_cmd_argv)))
13651365
)
13661366

13671367

@@ -1465,7 +1465,7 @@ class SlurmControllerLauncher(SlurmLauncher, BatchClusterAppMixin):
14651465
#SBATCH --ntasks=1
14661466
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
14671467
"""
1468-
% (' '.join(map(pipes.quote, ipcontroller_cmd_argv)))
1468+
% (' '.join(map(shlex.quote, ipcontroller_cmd_argv)))
14691469
)
14701470

14711471
def start(self):
@@ -1486,7 +1486,7 @@ class SlurmEngineSetLauncher(SlurmLauncher, BatchClusterAppMixin):
14861486
#SBATCH --job-name=ipy-engine-{cluster_id}
14871487
srun %s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
14881488
"""
1489-
% (' '.join(map(pipes.quote, ipengine_cmd_argv)))
1489+
% (' '.join(map(shlex.quote, ipengine_cmd_argv)))
14901490
)
14911491

14921492

@@ -1514,7 +1514,7 @@ class SGEControllerLauncher(SGELauncher, BatchClusterAppMixin):
15141514
#$ -N ipcontroller
15151515
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
15161516
"""
1517-
% (' '.join(map(pipes.quote, ipcontroller_cmd_argv)))
1517+
% (' '.join(map(shlex.quote, ipcontroller_cmd_argv)))
15181518
)
15191519

15201520
def start(self):
@@ -1534,7 +1534,7 @@ class SGEEngineSetLauncher(SGELauncher, BatchClusterAppMixin):
15341534
#$ -N ipengine
15351535
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
15361536
"""
1537-
% (' '.join(map(pipes.quote, ipengine_cmd_argv)))
1537+
% (' '.join(map(shlex.quote, ipengine_cmd_argv)))
15381538
)
15391539

15401540

@@ -1592,7 +1592,7 @@ class LSFControllerLauncher(LSFLauncher, BatchClusterAppMixin):
15921592
#BSUB -eo ipcontroller.e.%%J
15931593
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
15941594
"""
1595-
% (' '.join(map(pipes.quote, ipcontroller_cmd_argv)))
1595+
% (' '.join(map(shlex.quote, ipcontroller_cmd_argv)))
15961596
)
15971597

15981598
def start(self):
@@ -1612,7 +1612,7 @@ class LSFEngineSetLauncher(LSFLauncher, BatchClusterAppMixin):
16121612
#BSUB -eo ipengine.e.%%J
16131613
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
16141614
"""
1615-
% (' '.join(map(pipes.quote, ipengine_cmd_argv)))
1615+
% (' '.join(map(shlex.quote, ipengine_cmd_argv)))
16161616
)
16171617

16181618

0 commit comments

Comments
 (0)