Browse Source

fixed #58, apparently .reason isn't an attribute on HTTPError in python 2.6 even though it's documented as such

Daniel Roesler 9 years ago
parent
commit
fcb7cd6f66
1 changed files with 1 additions and 1 deletions
  1. 1 1
      acme_tiny.py

+ 1 - 1
acme_tiny.py

@@ -59,7 +59,7 @@ def get_crt(account_key, csr, acme_dir, log=LOGGER, CA=DEFAULT_CA):
             resp = urlopen(url, data.encode('utf8'))
             resp = urlopen(url, data.encode('utf8'))
             return resp.getcode(), resp.read()
             return resp.getcode(), resp.read()
         except IOError as e:
         except IOError as e:
-            return getattr(e, "code", None), getattr(e, "read", e.reason.__str__)()
+            return getattr(e, "code", None), getattr(e, "read", e.__str__)()
 
 
     # find domains
     # find domains
     log.info("Parsing CSR...")
     log.info("Parsing CSR...")