fix: code_run encoding compat; wechat truncate long code blocks & limit msg count
This commit is contained in:
@@ -8,6 +8,9 @@ def _d(b):
|
||||
except: return b.decode('gbk', 'replace')
|
||||
def _run(*a, **k):
|
||||
t = k.pop('text', 0) | k.pop('universal_newlines', 0)
|
||||
enc = k.pop('encoding', None)
|
||||
k.pop('errors', None)
|
||||
if enc: t = 1
|
||||
if t and isinstance(k.get('input'), str):
|
||||
k['input'] = k['input'].encode()
|
||||
r = _r(*a, **k)
|
||||
|
||||
Reference in New Issue
Block a user