Skip to content

Commit

Permalink
Now assuming that python3 executable is explicitly available for runn…
Browse files Browse the repository at this point in the history
…ing open_remote_file. Type hints
  • Loading branch information
Paul Nilsson committed Dec 5, 2023
1 parent fce4054 commit ec983a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.1.20
3.7.1.22
12 changes: 6 additions & 6 deletions pilot/user/atlas/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,14 +764,14 @@ def container_wrapper(cmd, workdir, job=None):
return cmd


def create_root_container_command(workdir, cmd):
def create_root_container_command(workdir: str, cmd: str) -> str:
"""
Create the container command for root.
:param workdir:
:param cmd:
:return:
:param workdir: workdir (str)
:param cmd: command to be containerised (str)
:return: container command to be executed (str).
"""

command = f'cd {workdir};'
content = get_root_container_script(cmd)
script_name = 'open_file.sh'
Expand Down Expand Up @@ -893,7 +893,7 @@ def get_root_container_script(cmd):
:return: script content (string).
"""

content = f'date\nlsetup \'root pilot\'\ndate\nstdbuf -oL bash -c \"python {cmd}\"\nexit $?'
content = f'date\nlsetup \'root pilot-default\'\ndate\nstdbuf -oL bash -c \"python3 {cmd}\"\nexit $?'
logger.debug(f'root setup script content:\n\n{content}\n\n')

return content
Expand Down
2 changes: 1 addition & 1 deletion pilot/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
RELEASE = '3' # released number should be fixed at 3 for Pilot 3
VERSION = '7' # version number is '1' for first release, '0' until then, increased for bigger updates
REVISION = '1' # revision number should be reset to '0' for every new version release, increased for small updates
BUILD = '20' # build number should be reset to '1' for every new development cycle
BUILD = '22' # build number should be reset to '1' for every new development cycle

SUCCESS = 0
FAILURE = 1
Expand Down

0 comments on commit ec983a1

Please sign in to comment.