Browse Source

fixed error reading for URLErrors and HTTPErrors

Daniel Roesler 9 years ago
parent
commit
69a457269a
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'))
             return resp.getcode(), resp.read()
         except IOError as e:
-            return getattr(e, "code", None), getattr(e, "read", str(e.reason))
+            return getattr(e, "code", None), getattr(e, "read", e.reason.__str__)()
 
     # find domains
     log.info("Parsing CSR...")