Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09ca1d1

Browse files
committed
Refactor checking for substring in output
1 parentabd75e5 commit09ca1d1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎src/lithium/interestingness/outputs.py‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ def interesting(
7272
run_info=timed_run(args.cmd_with_flags,args.timeout,temp_prefix)
7373

7474
iftemp_prefixisNone:
75-
outputs= (run_info.out,run_info.err)
76-
fordatainoutputs:
77-
if (args.regexandre.match(args.search,data,flags=re.MULTILINE))or (
78-
args.search.encode("utf-8")indata
79-
):
75+
encoded=args.search.encode("utf-8")
76+
match=encodedifargs.regexelsere.escape(encoded)
77+
fordatain (run_info.out,run_info.err):
78+
ifre.search(match,data,flags=re.MULTILINE):
8079
LOG.info("[Interesting] Match detected!")
8180
returnTrue
8281

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp