From 37fb23b9900e3fba10186ac6a937251d8744a85c Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: May 02 2023 21:46:32 +0000 Subject: Better error message when phase determining fails Signed-off-by: Troy Dawson --- diff --git a/src/centpkg/cli.py b/src/centpkg/cli.py index 5ef3f19..358b950 100755 --- a/src/centpkg/cli.py +++ b/src/centpkg/cli.py @@ -193,7 +193,14 @@ class centpkgClient(cliClient): self.log.info("Checking rhel-target information:") stream_version = self.cmd.target.split('-')[0] rhel_version = centpkg.utils.stream_mapping(stream_version) - active_y, in_stabilization = centpkg.utils.determine_active_y_version(rhel_version, pp_api_url) + try: + active_y, in_stabilization = centpkg.utils.determine_active_y_version(rhel_version, pp_api_url) + except AssertionError as e: + self.log.info(" Error: centpkg cannot determine the development phase.") + self.log.info(" Please file an issue at https://git.centos.org/centos/centpkg") + self.log.info(" Workaround: Use the --rhel-target option") + self.log.info("Exiting") + raise SystemExit divergent_branch = centpkg.utils.does_divergent_branch_exist( self.cmd.repo_name, rhel_version,