From 755e8b3109d5329b728e94869449b67565a42145 Mon Sep 17 00:00:00 2001 From: Don Penney Date: Mon, 19 Oct 2020 21:21:16 -0400 Subject: [PATCH] Fix setup_patch_repo error string The error handling for the patch release check in the setup_patch_repo utility has an invalid format string. Rather than providing a helpful error message, an exception occurs due to the format string. Change-Id: I1a5445f190353e4f37d2a8d0844327942b93cdf3 Closes-Bug: 1900634 Signed-off-by: Don Penney --- cgcs-patch/bin/setup_patch_repo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgcs-patch/bin/setup_patch_repo b/cgcs-patch/bin/setup_patch_repo index 6a2c8240..4330354d 100755 --- a/cgcs-patch/bin/setup_patch_repo +++ b/cgcs-patch/bin/setup_patch_repo @@ -1,7 +1,7 @@ #!/usr/bin/env python """ -Copyright (c) 2018 Wind River Systems, Inc. +Copyright (c) 2018-2020 Wind River Systems, Inc. SPDX-License-Identifier: Apache-2.0 @@ -110,7 +110,7 @@ def main(): patch_sw_version = thispatch.query_line(patch_id, 'sw_version') if patch_sw_version != sw_version: - print "%s is for release %s, not %s" % (patch_sw_version, sw_version) + raise Exception("%s is for release %s, not %s" % (patch_id, patch_sw_version, sw_version)) # Move the metadata to the "committed" dir, and the rpms to the Packages dir shutil.move('metadata.xml', os.path.join(committed_dir, "%s-metadata.xml" % patch_id))