mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-01-29 21:51:31 +00:00
perf: 修复ansible stdout 中非utf8的问题
This commit is contained in:
@@ -3,3 +3,7 @@ import re
|
||||
|
||||
def no_special_chars(s):
|
||||
return bool(re.match(r'\w+$', s))
|
||||
|
||||
|
||||
def safe_str(s):
|
||||
return s.encode('utf-8', errors='ignore').decode('utf-8')
|
||||
|
||||
Reference in New Issue
Block a user