From 0db445b09c1f556407e29e985a204f9e39cbdaae Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Jul 08 2024 20:20:12 +0000 Subject: Don't print the branch name after dash when there is no dash Fixes https://pagure.io/fedpkg/issue/554 Signed-off-by: Miro Hrončok --- diff --git a/fedpkg/__init__.py b/fedpkg/__init__.py index 0e1a007..abb4fb6 100644 --- a/fedpkg/__init__.py +++ b/fedpkg/__init__.py @@ -151,8 +151,9 @@ class Commands(pyrpkg.Commands): if not self._load_rpmdefines_branch(self.branch_merge, extra_rpmdefines): base = self.branch_merge.split('-', 1) # Allow branches like f38-staging - self.log.debug('Retrying with branch {}, feature {}' - .format(base[0], base[1])) + if len(base) > 1: + self.log.debug('Retrying with branch {}, feature {}' + .format(base[0], base[1])) if not (len(base) > 1 and base[0].isalnum() and len(base[1]) > 0 and self._load_rpmdefines_branch(base[0], extra_rpmdefines)): msg = ('Could not find release from branch name \'%s\'. '