From e9cef1f53906098b66b2f4af2365f25fcb9dc7ac Mon Sep 17 00:00:00 2001 From: Shruti Gupta Date: Fri, 6 Oct 2023 00:26:32 +0530 Subject: [PATCH] Fix CI error --- SetupDataPkg/Tools/KnobService.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/SetupDataPkg/Tools/KnobService.py b/SetupDataPkg/Tools/KnobService.py index e4f1bce2..125b94af 100644 --- a/SetupDataPkg/Tools/KnobService.py +++ b/SetupDataPkg/Tools/KnobService.py @@ -1238,8 +1238,8 @@ def arg_parse(): '''or --profilenames .''') parser.add_argument( '-pid', '--profileids', dest='profile_ids', type=str, default=None, - help='''Specify the comma separated profile ids (1-byte hexdecimal number prepend with 0x) by passing -pid ''' - '''or --profileids .''') + help='''Specify the comma separated profile ids (1-byte hexdecimal number prepend with 0x) ''' + '''by passing -pid or --profileids .''') return parser.parse_known_args() @@ -1316,16 +1316,17 @@ def main(): if len(ids) != len(profile_paths): sys.stderr.write('Invalid count of profile ids %d.\n' % len(ids)) return -1 - + formatted_profile_ids = [] for id in ids: - if id.startswith('0x') == False: + if id.startswith('0x') is False: sys.stderr.write('Profile id does not start with \'0x\'. \n') return -1 - profileid = int (id, 16) + profileid = int(id, 16) if profileid > 0xFF: - sys.stderr.write('Invalid profile id value 0x%x, should be 1-byte hexdecimal number. \n' % profileid) + sys.stderr.write('Invalid profile id value 0x%x, should be 1-byte hexdecimal number. \n' + % profileid) return -1 formatted_profile_ids.append(hex(profileid))