mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 04:31:38 +02:00
Merge branch 'cclauss-patch-1' into develop
This commit is contained in:
commit
01d463b4aa
1 changed files with 3 additions and 3 deletions
|
@ -19,10 +19,10 @@ PREPL_URI = "tcp://localhost:6063"
|
||||||
def get_prepl_conninfo():
|
def get_prepl_conninfo():
|
||||||
uri_data = urlparse(PREPL_URI)
|
uri_data = urlparse(PREPL_URI)
|
||||||
if uri_data.scheme != "tcp":
|
if uri_data.scheme != "tcp":
|
||||||
raise RuntimeException(f"invalid PREPL_URI: {PREPL_URI}")
|
raise RuntimeError(f"invalid PREPL_URI: {PREPL_URI}")
|
||||||
|
|
||||||
if not isinstance(uri_data.netloc, str):
|
if not isinstance(uri_data.netloc, str):
|
||||||
raise RuntimeException(f"invalid PREPL_URI: {PREPL_URI}")
|
raise RuntimeError(f"invalid PREPL_URI: {PREPL_URI}")
|
||||||
|
|
||||||
host, port = uri_data.netloc.split(":", 2)
|
host, port = uri_data.netloc.split(":", 2)
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ def send_eval(expr):
|
||||||
result = json.load(f)
|
result = json.load(f)
|
||||||
tag = result.get("tag", None)
|
tag = result.get("tag", None)
|
||||||
if tag != "ret":
|
if tag != "ret":
|
||||||
raise RuntimeException("unexpected response from PREPL")
|
raise RuntimeError("unexpected response from PREPL")
|
||||||
return result.get("val", None), result.get("exception", None)
|
return result.get("val", None), result.get("exception", None)
|
||||||
|
|
||||||
def encode(val):
|
def encode(val):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue