5
5
import copy
6
6
import logging
7
7
import os
8
- import pipes
8
+ import shlex
9
9
import stat
10
10
import sys
11
11
import time
@@ -633,7 +633,7 @@ def find_args(self):
633
633
self .ssh_cmd
634
634
+ self .ssh_args
635
635
+ [self .location ]
636
- + list (map (pipes .quote , self .program + self .program_args ))
636
+ + list (map (shlex .quote , self .program + self .program_args ))
637
637
)
638
638
639
639
def _send_file (self , local , remote ):
@@ -1341,7 +1341,7 @@ class PBSControllerLauncher(PBSLauncher, BatchClusterAppMixin):
1341
1341
#PBS -N ipcontroller
1342
1342
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
1343
1343
"""
1344
- % (' ' .join (map (pipes .quote , ipcontroller_cmd_argv )))
1344
+ % (' ' .join (map (shlex .quote , ipcontroller_cmd_argv )))
1345
1345
)
1346
1346
1347
1347
def start (self ):
@@ -1361,7 +1361,7 @@ class PBSEngineSetLauncher(PBSLauncher, BatchClusterAppMixin):
1361
1361
#PBS -N ipengine
1362
1362
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
1363
1363
"""
1364
- % (' ' .join (map (pipes .quote , ipengine_cmd_argv )))
1364
+ % (' ' .join (map (shlex .quote , ipengine_cmd_argv )))
1365
1365
)
1366
1366
1367
1367
@@ -1465,7 +1465,7 @@ class SlurmControllerLauncher(SlurmLauncher, BatchClusterAppMixin):
1465
1465
#SBATCH --ntasks=1
1466
1466
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
1467
1467
"""
1468
- % (' ' .join (map (pipes .quote , ipcontroller_cmd_argv )))
1468
+ % (' ' .join (map (shlex .quote , ipcontroller_cmd_argv )))
1469
1469
)
1470
1470
1471
1471
def start (self ):
@@ -1486,7 +1486,7 @@ class SlurmEngineSetLauncher(SlurmLauncher, BatchClusterAppMixin):
1486
1486
#SBATCH --job-name=ipy-engine-{cluster_id}
1487
1487
srun %s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
1488
1488
"""
1489
- % (' ' .join (map (pipes .quote , ipengine_cmd_argv )))
1489
+ % (' ' .join (map (shlex .quote , ipengine_cmd_argv )))
1490
1490
)
1491
1491
1492
1492
@@ -1514,7 +1514,7 @@ class SGEControllerLauncher(SGELauncher, BatchClusterAppMixin):
1514
1514
#$ -N ipcontroller
1515
1515
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
1516
1516
"""
1517
- % (' ' .join (map (pipes .quote , ipcontroller_cmd_argv )))
1517
+ % (' ' .join (map (shlex .quote , ipcontroller_cmd_argv )))
1518
1518
)
1519
1519
1520
1520
def start (self ):
@@ -1534,7 +1534,7 @@ class SGEEngineSetLauncher(SGELauncher, BatchClusterAppMixin):
1534
1534
#$ -N ipengine
1535
1535
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
1536
1536
"""
1537
- % (' ' .join (map (pipes .quote , ipengine_cmd_argv )))
1537
+ % (' ' .join (map (shlex .quote , ipengine_cmd_argv )))
1538
1538
)
1539
1539
1540
1540
@@ -1592,7 +1592,7 @@ class LSFControllerLauncher(LSFLauncher, BatchClusterAppMixin):
1592
1592
#BSUB -eo ipcontroller.e.%%J
1593
1593
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
1594
1594
"""
1595
- % (' ' .join (map (pipes .quote , ipcontroller_cmd_argv )))
1595
+ % (' ' .join (map (shlex .quote , ipcontroller_cmd_argv )))
1596
1596
)
1597
1597
1598
1598
def start (self ):
@@ -1612,7 +1612,7 @@ class LSFEngineSetLauncher(LSFLauncher, BatchClusterAppMixin):
1612
1612
#BSUB -eo ipengine.e.%%J
1613
1613
%s --profile-dir="{profile_dir}" --cluster-id="{cluster_id}"
1614
1614
"""
1615
- % (' ' .join (map (pipes .quote , ipengine_cmd_argv )))
1615
+ % (' ' .join (map (shlex .quote , ipengine_cmd_argv )))
1616
1616
)
1617
1617
1618
1618
0 commit comments