diff options
author | Zhijux Fan <zhijux.fan@intel.com> | 2018-12-17 00:14:51 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-02-01 11:09:18 +0800 |
commit | 56ad03a5dc865322b3382ecf92f047b3360d822a (patch) | |
tree | d0ac300c61ac59a09d8443755bce13c6e79dcd74 /BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py | |
parent | d097412330bd2a9c0481b74af7051e317e33be23 (diff) | |
download | edk2-56ad03a5dc865322b3382ecf92f047b3360d822a.tar.gz edk2-56ad03a5dc865322b3382ecf92f047b3360d822a.tar.bz2 edk2-56ad03a5dc865322b3382ecf92f047b3360d822a.zip |
BaseTools: Update argparse arguments since it not have version now
argparse.ArgumentParser not have version parameter
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py')
-rw-r--r-- | BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py index c5c99d94ef..2a7c308895 100644 --- a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py +++ b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py @@ -76,10 +76,11 @@ 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("-e", action="store_true", dest='Encode', help='encode file')
group.add_argument("-d", action="store_true", dest='Decode', help='decode file')
+ group.add_argument("--version", action='version', version=__version__)
parser.add_argument("-o", "--output", dest='OutputFile', type=str, metavar='filename', help="specify the output filename", required=True)
parser.add_argument("--signer-private-cert", dest='SignerPrivateCertFile', type=argparse.FileType('rb'), help="specify the signer private cert filename. If not specified, a test signer private cert is used.")
parser.add_argument("--other-public-cert", dest='OtherPublicCertFile', type=argparse.FileType('rb'), help="specify the other public cert filename. If not specified, a test other public cert is used.")
|