From 20f957eef1dbd57df12513fa28509bcae0918a6e Mon Sep 17 00:00:00 2001 From: Vanessa Sochat Date: Wed, 5 Jun 2019 17:05:15 -0400 Subject: [PATCH] rename confusing build step Signed-off-by: Vanessa Sochat --- .circleci/config.yml | 4 ++-- CHANGELOG.md | 1 + spython/main/inspect.py | 11 ++++++++--- spython/version.py | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 745ddc44..291a4925 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,12 +19,12 @@ workflows: singularity-3: true - run-spython-ci-tests: <<: *base_job - name: "Oldest Singularity - Python 3" + name: "Singularity 3.1.0 - Python 3" singularity: 3.1.0 run-linter: true # Use any job to run linter once - run-spython-ci-tests: <<: *base_job - name: "Singularity after OCI change - Python 3" + name: "Singularity 3.2.0 - Python 3" singularity: 3.2.0 - run-spython-ci-tests: <<: *base_job diff --git a/CHANGELOG.md b/CHANGELOG.md index d6c299e2..5e56a78a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) + - fixing bug that inspect does not honor quiet (0.0.65) - refactor recipe parsers, writers, and base (0.0.64) - paths for files, add, copy, will not be expanded as it adds hardcoded paths - oci state fixes and added Client.version_info() (0.0.63) diff --git a/spython/main/inspect.py b/spython/main/inspect.py index 4d479f77..dbec9ab4 100644 --- a/spython/main/inspect.py +++ b/spython/main/inspect.py @@ -6,6 +6,7 @@ # with this file, You can obtain one at http://mozilla.org/MPL/2.0/. import json as jsonp +from spython.logger import bot from spython.utils import ( check_install, @@ -26,11 +27,15 @@ def inspect(self, image=None, json=True, app=None, quiet=True): check_install() # No image provided, default to use the client's loaded image - if image is None: + if not image: image = self._get_uri() + # If there still isn't an image, exit on error + if not image: + bot.exit('Please provide an image to inspect.') + cmd = self._init_command('inspect') - if app is not None: + if app: cmd = cmd + ['--app', app] options = ['e', 'd', 'l', 'r', 'hf', 't'] @@ -47,7 +52,7 @@ def inspect(self, image=None, json=True, app=None, quiet=True): cmd.append('--json') cmd.append(image) - result = run_command(cmd, quiet=False) + result = run_command(cmd, quiet=quiet) if result['return_code'] == 0: result = jsonp.loads(result['message'][0]) diff --git a/spython/version.py b/spython/version.py index 7bb0416e..8ce9612d 100644 --- a/spython/version.py +++ b/spython/version.py @@ -6,7 +6,7 @@ # with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -__version__ = "0.0.64" +__version__ = "0.0.65" AUTHOR = 'Vanessa Sochat' AUTHOR_EMAIL = 'vsochat@stanford.edu' NAME = 'spython'