From e91688517036339120b430788587ddd639d422bb Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 25 Apr 2020 18:24:28 -0400 Subject: acmens.py: Add main. * acmens.py (main): New function. Move code under the "main" block into this function and make "main" block call this. --- acmens.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acmens.py b/acmens.py index baade53..bb3f28e 100644 --- a/acmens.py +++ b/acmens.py @@ -315,7 +315,7 @@ def revoke_crt(account_key, crt): sys.stderr.write("Certificate revoked!\n") -if __name__ == "__main__": +def main(): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description="""\ @@ -368,3 +368,6 @@ $ python3 acmens.py --revoke --account-key user.key --crt domain.crt signed_crt = sign_csr(args.account_key, args.csr, email=args.email) sys.stdout.write(signed_crt) + +if __name__ == "__main__": + main() -- cgit v1.2.3