Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to
singularity on pypi), and the versions here will coincide with these releases.

## [master](https://github.com/singularityhub/singularity-cli/tree/master)
- flexible error printing given command to terminal fails (0.0.43)
- adding name_by_commit and name_by_hash to pull (0.0.42)
- adding nvidia flag as nv argument (with default False) to run/exec (0.0.41)
- fixing bug in shell.py, cli should be client (0.0.40)
Expand Down
2 changes: 1 addition & 1 deletion spython/main/base/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def run_command(self, cmd, sudo=False, capture=True):
result = run_cmd(cmd, sudo=sudo, capture=capture, quiet=self.quiet)
message = result['message']
return_code = result['return_code']

if result['return_code'] == 0:
if len(message) == 1:
message = message[0]
Expand Down
15 changes: 8 additions & 7 deletions spython/main/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ def run(self,
else:
return stream_command(cmd, sudo=sudo)

result = result.strip('\n')

try:
result = json.loads(result)
except:
pass
return result
if result:
result = result.strip('\n')

try:
result = json.loads(result)
except:
pass
return result
4 changes: 2 additions & 2 deletions spython/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@



__version__ = "0.0.42"
__version__ = "0.0.43"
AUTHOR = 'Vanessa Sochat'
AUTHOR_EMAIL = 'vsochat@stanford.edu'
NAME = 'spython'
Expand All @@ -28,4 +28,4 @@
LICENSE = "LICENSE"

INSTALL_REQUIRES = (
)
)