Commit 95851154 by 文周繁

fix:python3环境下报错

parent 6a7d6f45
...@@ -30,6 +30,7 @@ def TIMEOUT_COMMAND(command, path, output_seeds_dirname, stdout, stderr): ...@@ -30,6 +30,7 @@ def TIMEOUT_COMMAND(command, path, output_seeds_dirname, stdout, stderr):
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
outs, errs = process.communicate() outs, errs = process.communicate()
errs = str(errs, "utf-8", errors='ignore') errs = str(errs, "utf-8", errors='ignore')
outs = str(outs, "utf-8", errors='ignore')
stdout.write(outs) stdout.write(outs)
is_search_0 = False is_search_0 = False
search_by_count = 0 search_by_count = 0
......
...@@ -31,6 +31,7 @@ def TIMEOUT_COMMAND(command, path, output_seeds_dirname, stdout, stderr): ...@@ -31,6 +31,7 @@ def TIMEOUT_COMMAND(command, path, output_seeds_dirname, stdout, stderr):
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
outs, errs = process.communicate() outs, errs = process.communicate()
errs = str(errs, "utf-8", errors='ignore') errs = str(errs, "utf-8", errors='ignore')
outs = str(outs, "utf-8", errors='ignore')
stdout.write(outs) stdout.write(outs)
err_data = '' err_data = ''
search_at_count = 0 search_at_count = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment