Skip to content

Commit ca5fe67

Browse files
committed
refactor: use str.find() to avoid double scan of analysis log
1 parent 6f4953a commit ca5fe67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/processing/analysisinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def get_package(self):
7373
'INFO: analysis package selected: "',
7474
'INFO: Automatically selected analysis package "',
7575
):
76-
if marker in analysis_log:
77-
idx = analysis_log.index(marker)
76+
idx = analysis_log.find(marker)
77+
if idx != -1:
7878
package = analysis_log[idx + len(marker) :].split('"', 1)[0]
7979
break
8080
return package

0 commit comments

Comments
 (0)