notebookvb
This commit is contained in:
@@ -4,8 +4,12 @@ import pymysql
|
||||
|
||||
|
||||
def _print(msg):
|
||||
print(msg, file=sys.stdout, flush=True) if sys.stdout.encoding and sys.stdout.encoding.lower() in ("utf-8", "utf8") \
|
||||
else print(msg.encode("utf-8", errors="replace").decode("ascii", errors="replace"), flush=True)
|
||||
# Diagnostika jde na stderr — stdout je u MCP serverů vyhrazen pro JSON-RPC.
|
||||
if sys.stderr.encoding and sys.stderr.encoding.lower() in ("utf-8", "utf8"):
|
||||
print(msg, file=sys.stderr, flush=True)
|
||||
else:
|
||||
print(msg.encode("utf-8", errors="replace").decode("ascii", errors="replace"),
|
||||
file=sys.stderr, flush=True)
|
||||
|
||||
_LOCAL_HOSTS = {"lekar", "sestra", "lenovo"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user