diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-01-21 11:40:39 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-01-21 11:40:39 +0100 |
commit | 8ee388c807e589d06b3526c17bfb34810001c1ee (patch) | |
tree | 238ee8e256e34b238a98823d29c4068801cc8286 /tests | |
parent | 805ca36a222c5649b16134e818f8c8b23415c7a2 (diff) | |
download | gemato-8ee388c807e589d06b3526c17bfb34810001c1ee.tar.gz |
tests.keydata: Add __main__ that prints keydata
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/keydata.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/keydata.py b/tests/keydata.py index 1be5fdb..9391206 100644 --- a/tests/keydata.py +++ b/tests/keydata.py @@ -1,5 +1,5 @@ # gemato: OpenPGP key data for tests -# (c) 2017-2022 Michał Górny +# (c) 2017-2023 Michał Górny # Licensed under the terms of 2-clause BSD license import base64 @@ -148,3 +148,17 @@ Yp/6PW+SlL5drIOi45vfRbRvGMiirQVolbb4FzUL5fYROrp6Rt/UCBTpK1xnoTbOtzyTLSq2 Wq7iapS3DqitGoDRtKyPXeSFDpWsgcAYzghFMI265fqeBebTeKtz7mtYUw4DrBlYXSBPpRte T1oNst52zSr1Wzuc9w== ''') + + +if __name__ == "__main__": + import argparse + import sys + + argp = argparse.ArgumentParser() + argp.add_argument("variable", + nargs="+", + choices=sorted(x for x in globals() if x[0].isupper()), + help="Variables to print") + args = argp.parse_args() + + sys.stdout.buffer.write(b"".join(globals()[x] for x in args.variable)) |