Skip to content

Commit c4006c6

Browse files
committed
Make sure Req_Error is passed a string
1 parent 0f12c5c commit c4006c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tern.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def f(port, doc):
264264
req = opener.open("http://" + localhost + ":" + str(port) + "/", json.dumps(doc).encode("utf-8"), 1)
265265
return json.loads(req.read().decode("utf-8"))
266266
except urllib.error.URLError as error:
267-
raise Req_Error((hasattr(error, "read") and error.read().decode("utf-8")) or error.reason)
267+
raise Req_Error((hasattr(error, "read") and error.read().decode("utf-8")) or str(error.reason))
268268
return f
269269

270270
if python3:

0 commit comments

Comments
 (0)