Skip to content

Commit dd013ba

Browse files
authored
fix bug with instance run command (#214)
* fix bug with instance run command the incorrect function is exposed for instance.run_command it is missing the self parameter, and so the instance (self) is passed as the command. Signed-off-by: vsoch <[email protected]>
1 parent ef53ca3 commit dd013ba

40 files changed

+48
-77
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to
1717
singularity on pypi), and the versions here will coincide with these releases.
1818

1919
## [master](https://github.com/singularityhub/singularity-cli/tree/master)
20+
- bug with instance.run_command (0.3.12)
2021
- added check to enbsure stderr exists upon a non-zero return code when streaming (0.3.11)
2122
- exposed the stream type option, and ability to capture both stdout and stderr when stream=True (0.3.1)
2223
- dropping support for Singularity 2.x (0.3.0)

setup.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
"""
2-
3-
Copyright (C) 2017-2021 Vanessa Sochat.
4-
5-
This Source Code Form is subject to the terms of the
6-
Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
7-
with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
8-
9-
"""
10-
11-
121
import os
132

143
from setuptools import find_packages, setup

spython/__init__.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
"""
2-
3-
Copyright (C) 2017-2022 Vanessa Sochat.
4-
5-
This Source Code Form is subject to the terms of the
6-
Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
7-
with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
8-
9-
"""
10-
111
from spython.version import __version__

spython/client/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#!/usr/bin/env python
22

3-
# Copyright (C) 2017-2022 Vanessa Sochat.
3+
# Copyright (C) 2017-2024 Vanessa Sochat.
44

55
# This Source Code Form is subject to the terms of the
66
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
77
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
88

9-
109
import argparse
1110
import os
1211
import sys

spython/client/recipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2017-2022 Vanessa Sochat.
1+
# Copyright (C) 2017-2024 Vanessa Sochat.
22

33
# This Source Code Form is subject to the terms of the
44
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed

spython/client/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2017-2022 Vanessa Sochat.
1+
# Copyright (C) 2017-2024 Vanessa Sochat.
22

33
# This Source Code Form is subject to the terms of the
44
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed

spython/client/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2017-2022 Vanessa Sochat.
1+
# Copyright (C) 2017-2024 Vanessa Sochat.
22

33
# This Source Code Form is subject to the terms of the
44
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed

spython/image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Copyright (C) 2017-2022 Vanessa Sochat.
1+
# Copyright (C) 2017-2024 Vanessa Sochat.
22

33
# This Source Code Form is subject to the terms of the
44
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
55
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7+
78
import hashlib
89
import os
910

spython/instance/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2017-2022 Vanessa Sochat.
1+
# Copyright (C) 2017-2024 Vanessa Sochat.
22

33
# This Source Code Form is subject to the terms of the
44
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed

spython/instance/cmd/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2017-2022 Vanessa Sochat.
1+
# Copyright (C) 2017-2024 Vanessa Sochat.
22

33
# This Source Code Form is subject to the terms of the
44
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
@@ -18,16 +18,14 @@ def generate_instance_commands():
1818
from spython.main.base.generate import RobotNamer
1919
from spython.main.base.logger import println
2020
from spython.main.instances import list_instances
21-
from spython.utils import run_command as run_cmd
2221

2322
from .logs import _logs, error_logs, output_logs
2423
from .start import start
2524
from .stop import stop
2625

2726
Instance.RobotNamer = RobotNamer()
2827
Instance._init_command = init_command
29-
Instance.run_command = run_cmd
30-
Instance._run_command = run_command
28+
Instance.run_command = run_command
3129
Instance._list = list_instances # list command is used to get metadata
3230
Instance._println = println
3331
Instance.start = start # intended to be called on init, not by user

0 commit comments

Comments
 (0)