From 8ee388c807e589d06b3526c17bfb34810001c1ee Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 21 Jan 2023 11:40:39 +0100 Subject: tests.keydata: Add __main__ that prints keydata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- tests/keydata.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/keydata.py') 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)) -- cgit v1.2.3