Commit c7e9259d by 文周繁

fix:python3环境下报错

parent 95851154
......@@ -45,7 +45,7 @@ def TIMEOUT_COMMAND(command, path, output_seeds_dirname, stdout, stderr):
search_by_count += 1
_, end = pattern_asan.search(i).span()
error_cause += i[end:]
if not invalid_cause_dict.has_key(error_cause):
if not invalid_cause_dict.get(error_cause, None):
stderr.write(command)
stderr.write("\r\n")
stderr.write(errs)
......
......@@ -52,7 +52,7 @@ def TIMEOUT_COMMAND(command, path, output_seeds_dirname, stdout, stderr):
error_cause += i[end:]
elif pattern_valgrind_tail.match(i) is not None:
err_data = err_data + i + "\n"
if not invalid_cause_dict.has_key(error_cause):
if not invalid_cause_dict.get(error_cause, None):
stderr.write(err_data)
# TODO write to mangodb
invalid_cause_dict[error_cause] = 1
......
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