From 24b8461cb3f26a23d98a29ee2aef252765318648 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Feb 27 2023 18:23:31 +0000 Subject: Fix logic --- diff --git a/src/centpkg/cli.py b/src/centpkg/cli.py index 502ebb3..c8c7539 100755 --- a/src/centpkg/cli.py +++ b/src/centpkg/cli.py @@ -152,7 +152,6 @@ class centpkgClient(cliClient): build_parser.add_argument( '--rhel-target', choices=['exception', 'zstream', 'latest'], - default='latest', help='Set the rhel-target metadata') # Overloaded _build @@ -182,13 +181,13 @@ class centpkgClient(cliClient): # Good to know if divergent_branch : - self.log.info(" A divergent branch was found.") + self.log.info(" a divergent branch was found.") else: - self.log.info(" A divergent branch was not found.") + self.log.info(" a divergent branch was not found.") if in_stabilization : - self.log.info(" We are in stabilization mode.") + self.log.info(" we are in stabilization mode.") else: - self.log.info(" We are not in stabilization mode.") + self.log.info(" we are not in stabilization mode.") # Update args.custom_user_metadata if hasattr(self.args, 'custom_user_metadata') and self.args.custom_user_metadata: @@ -202,7 +201,7 @@ class centpkgClient(cliClient): if hasattr(self.args, 'rhel_target') and self.args.rhel_target: temp_custom_user_metadata["rhel-target"] = self.args.rhel_target else: - if divergent_branch and not in_stabilization : + if divergent_branch: temp_custom_user_metadata["rhel-target"] = "latest" elif not divergent_branch and not in_stabilization : temp_custom_user_metadata["rhel-target"] = "zstream" @@ -218,7 +217,7 @@ class centpkgClient(cliClient): temp_custom_user_metadata = {"rhel-target": self.args.rhel_target} self.args.custom_user_metadata = json.dumps(temp_custom_user_metadata) else: - if divergent_branch and not in_stabilization : + if divergent_branch: self.args.custom_user_metadata = '{"rhel-target": "latest"}' elif not divergent_branch and not in_stabilization : self.args.custom_user_metadata = '{"rhel-target": "zstream"}'