From 60dc40db2aac3d84332dbb17b1d20e353bfceb0c Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Fri, 24 Aug 2018 14:01:50 +0800 Subject: BaseTools: Update argparse arguments since it not have version now argparse.ArgumentParser not have version parameter Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Liming Gao --- BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py') diff --git a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py index 2fae8e5772..14e92a5d8b 100644 --- a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py +++ b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py @@ -75,8 +75,9 @@ if __name__ == '__main__': # # Create command line argument parser object # - parser = argparse.ArgumentParser(prog=__prog__, version=__version__, usage=__usage__, description=__copyright__, conflict_handler='resolve') + parser = argparse.ArgumentParser(prog=__prog__, usage=__usage__, description=__copyright__, conflict_handler='resolve') group = parser.add_mutually_exclusive_group(required=True) + group.add_argument("--version", action='version', version=__version__) group.add_argument("-e", action="store_true", dest='Encode', help='encode file') group.add_argument("-d", action="store_true", dest='Decode', help='decode file') parser.add_argument("-o", "--output", dest='OutputFile', type=str, metavar='filename', help="specify the output filename", required=True) -- cgit v1.2.3