From 52b5ec273bba7b26721f066e9ef0ca391376b7f4 Mon Sep 17 00:00:00 2001 From: David Michaels Date: Mon, 19 Aug 2024 13:24:55 -0400 Subject: [PATCH] Minor changes to utility/troubleshooting/convenience script view-portal-object. --- dcicutils/scripts/update_portal_object.py | 7 ++++--- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dcicutils/scripts/update_portal_object.py b/dcicutils/scripts/update_portal_object.py index e90be01e7..4863fc840 100644 --- a/dcicutils/scripts/update_portal_object.py +++ b/dcicutils/scripts/update_portal_object.py @@ -707,9 +707,10 @@ def _create_portal(env: Optional[str] = None, ini: Optional[str] = None, app: Op if (not load) and (app == APP_SMAHT) and (env := os.environ.get(_SMAHT_ENV_ENVIRON_NAME)): env_from_environ = True if not env: - if os.path.exists(ini_file := os.path.normpath(os.path.join(os.getcwd(), _DEFAULT_INI_FILE_FOR_LOAD))): - return _create_portal(ini=ini_file, app=app, verbose=verbose, debug=debug) - return None + if not os.path.exists(ini_file := os.path.normpath(os.path.join(os.getcwd(), _DEFAULT_INI_FILE_FOR_LOAD))): + _print("Must specify --ini or --env option in order to create a Portal object.") + return None + return _create_portal(ini=ini_file, app=app, verbose=verbose, debug=debug) if not (portal := Portal(env, app=app) if env or app else None): _print(f"Cannot create access-key based Portal object: {env}{f' ({app})' if app else ''}") return None diff --git a/pyproject.toml b/pyproject.toml index 24175f1ad..a0ec694a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dcicutils" -version = "8.14.0.1b25" # TODO: To become 8.14.1 +version = "8.14.0.1b26" # TODO: To become 8.14.1 description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources" authors = ["4DN-DCIC Team "] license = "MIT"