We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44f006c commit b3c1b3aCopy full SHA for b3c1b3a
tern.py
@@ -264,7 +264,10 @@ def f(port, doc):
264
req = opener.open("http://" + localhost + ":" + str(port) + "/", json.dumps(doc).encode("utf-8"), 1)
265
return json.loads(req.read().decode("utf-8"))
266
except urllib.error.URLError as error:
267
- raise Req_Error((hasattr(error, "read") and error.read().decode("utf-8")) or str(error.reason))
+ if hasattr(error, "read"):
268
+ raise Req_Error(error.read().decode("utf-8"))
269
+ else:
270
+ raise error
271
return f
272
273
if python3:
0 commit comments