acmecer: Accept "pending" challenge status after submission.
[utils.git] / acmecert
index 96507e7..9cf9b6a 100755 (executable)
--- a/acmecert
+++ b/acmecert
@@ -248,6 +248,10 @@ def authorder(acct, htconf, orderid):
                     resp, headers = jreq(ch["url"], {}, acct)
                     if resp["status"] == "processing":
                         time.sleep(2)
+                    elif resp["status"] == "pending":
+                        # I don't think this should happen, but it
+                        # does. LE bug? Anyway, just retry.
+                        break
                     elif resp["status"] == "valid":
                         break
                     else:
@@ -326,11 +330,11 @@ def cmd_acct_info(args):
     if len(args) < 2: raise usageerr()
     with maybeopen(args[1], "r") as fp:
         pprint.pprint(account.read(fp).getinfo())
-commands["acct-info"] = cmd_validate_acct
+commands["acct-info"] = cmd_acct_info
 
 def cmd_order(args):
     "usage: acmecert order ACCOUNT-FILE CSR [OUTPUT-FILE]"
-    if len(args) < 4: raise usageerr()
+    if len(args) < 3: raise usageerr()
     with maybeopen(args[1], "r") as fp:
         acct = account.read(fp)
     with maybeopen(args[2], "r") as fp: