Skip to content

Commit

Permalink
Merge pull request #6431 from dimagi/orangejenny-patch-1
Browse files Browse the repository at this point in the history
Updated error message when unable to get versions from host
  • Loading branch information
gherceg authored Nov 4, 2024
2 parents 58eaa4d + f099ea5 commit 0c5c472
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/commcare_cloud/commands/deploy/commcare.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,12 @@ def get_deployed_version(environment, from_source=False):
# hosts. A private release can be converted to a full release
# using --resume=RELEASE_NAME without --private.
versions = {host_result.get('stdout') for host_result in res.values() if host_result.get('rc') == 0}
if not versions or len(versions) > 1:
raise BadAnsibleResult("Unable to get version from hosts")
if not versions:
raise BadAnsibleResult("Unable to get version from hosts: no versions found. Try again soon.")
if len(versions) > 1:
raise BadAnsibleResult(
f"Unable to get version from hosts. Multiple versions found: {versions}. Try again soon."
)
return list(versions)[0]


Expand Down

0 comments on commit 0c5c472

Please sign in to comment.