summaryrefslogtreecommitdiffstats
path: root/acmens.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-04-25 18:24:28 -0400
committerrsiddharth <s@ricketyspace.net>2020-04-25 18:24:28 -0400
commite91688517036339120b430788587ddd639d422bb (patch)
tree0670095782817da9c329d11f3b2e1cedac967064 /acmens.py
parent658419dae30bf8a997a7b6612b1e113b30852705 (diff)
acmens.py: Add main.
* acmens.py (main): New function. Move code under the "main" block into this function and make "main" block call this.
Diffstat (limited to 'acmens.py')
-rw-r--r--acmens.py5
1 files changed, 4 insertions, 1 deletions
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()