From f44c3ea917b43056b7e3fd0a95e6c3333be1b9b1 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Mar 15 2019 06:46:24 +0000 Subject: Fix fedpkg update --bugs detection If no value is returned by the validation process of the command parameters, the specifed parameters are not taken into account. Hence the --bugs parameters not currently working. The --bugs parameters is also stored as a list, it should thus be "joined" to be used in the update template. Signed-off-by: Robert-André Mauchin --- diff --git a/fedpkg/cli.py b/fedpkg/cli.py index abd8b80..a41304f 100644 --- a/fedpkg/cli.py +++ b/fedpkg/cli.py @@ -167,6 +167,7 @@ change log if option --notes is omitted. raise error if karma <= 0: raise error + return karma def validate_unstable_karma(value): error = argparse.ArgumentTypeError( @@ -177,11 +178,13 @@ change log if option --notes is omitted. raise error if karma >= 0: raise error + return karma def validate_bugs(value): if not value.isdigit(): raise argparse.ArgumentTypeError( 'Invalid bug {0}. It should be an integer.'.format(value)) + return value update_parser.add_argument( '--type', @@ -678,7 +681,7 @@ targets to build the package for a particular stream. clog = "" if self.args.bugs: - bodhi_args['bugs'] = self.args.bugs + bodhi_args['bugs'] = ','.join(self.args.bugs) else: # Extract bug numbers from the latest changelog entry bugs = re.findall(r'#([0-9]*)', clog)