From 5e335f9a5f94047532e20114e8be0eaa336c1108 Mon Sep 17 00:00:00 2001 From: James Kasten Date: Tue, 25 Nov 2014 00:43:18 -0800 Subject: [PATCH] PEP8 compliance main.py --- letsencrypt/scripts/main.py | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/letsencrypt/scripts/main.py b/letsencrypt/scripts/main.py index 22236cc6d..e4f63a239 100755 --- a/letsencrypt/scripts/main.py +++ b/letsencrypt/scripts/main.py @@ -74,7 +74,7 @@ def main(): elif o == "--help": print_options() elif o == "--test": - #put any temporary tests in here + # put any temporary tests in here continue if curses: @@ -91,30 +91,36 @@ def main(): else: c.authenticate(args, redirect, eula) + def usage(): s = "Available options: --text, --privkey=, --csr=, --server=, " s += "--rollback=, --view-checkpoints, --revoke, --agree-eula, --redirect," s += " --no-redirect, --help" print s + def print_options(): - print "\nsudo ./letsencrypt.py (default authentication mode using pythondialog)" - options = [ "privkey= (specify privatekey file to use to generate the certificate)", - "csr= (Use a specific CSR. If this is specified, privkey " + - "must also be specified with the correct private key for the CSR)", - "server (list the ACME CA server address)", - "revoke (revoke a certificate)", - "view-checkpoints (Used to view available checkpoints and " + - "see what configuration changes have been made)", - "rollback=X (Revert the configuration X number of checkpoints)", - "redirect (Automatically redirect all HTTP traffic to " + - "HTTPS for the newly authenticated vhost)", - "no-redirect (Skip the HTTPS redirect question, " + - "allowing both HTTP and HTTPS)", - "agree-eula (Skip the end user agreement screen)" ] + print ("\nsudo ./letsencrypt.py " + "(default authentication mode using pythondialog)") + options = ["privkey= (specify key file to use to generate the " + + "certificate)", + "csr= (Use a specific CSR. If this is specified, privkey " + + "must also be specified with the correct" + + " private key for the CSR)", + "server (list the ACME CA server address)", + "revoke (revoke a certificate)", + "view-checkpoints (Used to view available checkpoints and " + + "see what configuration changes have been made)", + "rollback=X (Revert the configuration X number of checkpoints)", + "redirect (Automatically redirect all HTTP traffic to " + + "HTTPS for the newly authenticated vhost)", + "no-redirect (Skip the HTTPS redirect question, " + + "allowing both HTTP and HTTPS)", + "agree-eula (Skip the end user agreement screen)"] for o in options: print " --%s" % o sys.exit(0) + if __name__ == "__main__": main()