Skip to content

Commit 6eb7f8e

Browse files
committed
Do not force the use of Python2
1 parent 59cb2a6 commit 6eb7f8e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

scripts/smart-dispatch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
from __future__ import print_function
44

@@ -102,7 +102,7 @@ def main():
102102

103103
# Generating all the worker commands
104104
worker_script = pjoin(os.path.dirname(smartdispatch.__file__), 'workers', 'base_worker.py')
105-
COMMAND_STRING = 'cd "{cwd}"; python2 {worker_script} "{commands_file}" "{log_folder}" '\
105+
COMMAND_STRING = 'cd "{cwd}"; python {worker_script} "{commands_file}" "{log_folder}" '\
106106
'1>> "{log_folder}/worker/$PBS_JOBID\"\"_worker_{{ID}}.o" '\
107107
'2>> "{log_folder}/worker/$PBS_JOBID\"\"_worker_{{ID}}.e" '
108108
COMMAND_STRING = COMMAND_STRING.format(cwd=os.getcwd(), worker_script=worker_script, commands_file=command_manager._commands_filename, log_folder=path_job_logs)

smartdispatch/workers/base_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

44
import os

smartdispatch/workers/tests/test_base_worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def tearDown(self):
3232
shutil.rmtree(self.logs_dir)
3333

3434
def test_main(self):
35-
command = ['python2', self.base_worker_script, self.command_manager._commands_filename, self.logs_dir]
35+
command = ['python', self.base_worker_script, self.command_manager._commands_filename, self.logs_dir]
3636
assert_equal(call(command), 0)
3737
# Simulate a resume, i.e. re-run the command, the output/error should be concatenated.
3838
self.command_manager.set_commands_to_run(self.commands)
@@ -106,7 +106,7 @@ def test_main(self):
106106
assert_equal("", logfile.read())
107107

108108
def test_lock(self):
109-
command = ['python2', self.base_worker_script, self.command_manager._commands_filename, self.logs_dir]
109+
command = ['python', self.base_worker_script, self.command_manager._commands_filename, self.logs_dir]
110110

111111
# Lock the commands file before running 'base_worker.py'
112112
with open_with_lock(self.command_manager._commands_filename, 'r+'):

0 commit comments

Comments
 (0)