mirror of
https://github.com/frida/frida-python
synced 2026-06-08 14:16:17 +00:00
Gracefully handling unicode errors
This commit is contained in:
+1
-1
@@ -438,7 +438,7 @@ class Repository(object):
|
||||
try:
|
||||
with open(os.devnull, 'w') as devnull:
|
||||
output = subprocess.check_output(["man", "-P", "col -b", "2", function.name], stderr=devnull)
|
||||
match = re.search(r"^SYNOPSIS(?:.|\n)*?((?:^.+$\n)* {5}" + function.name + r"\(.*\n(^.+$\n)*)(?:.|\n)*^DESCRIPTION", output.decode(), re.MULTILINE)
|
||||
match = re.search(r"^SYNOPSIS(?:.|\n)*?((?:^.+$\n)* {5}" + function.name + r"\(.*\n(^.+$\n)*)(?:.|\n)*^DESCRIPTION", output.decode(errors="replace"), re.MULTILINE)
|
||||
if match:
|
||||
decl = match.group(1)
|
||||
for argm in re.finditer(r"([^* ]*)\s*(,|\))", decl):
|
||||
|
||||
Reference in New Issue
Block a user