fix use of "or" with "in lines[i]" in is_main detection
It's probably obvious what I tried to do. Unfortunately, only the first string works. I also added another "and not" condition, to keep the same file from getting multiple entries in is_main.
This commit is contained in:
parent
4bfcb7fe66
commit
6c2802c952
1 changed files with 1 additions and 1 deletions
|
@ -888,7 +888,7 @@ def sanity_check(filename, lines):
|
|||
# We will also take the opportunity to check if the file is a top-level main
|
||||
textdomains = []
|
||||
for i in range(len(lines)):
|
||||
if ("[campaign]" or "[binary_path]" or "[textdomain]") in lines[i] and not filename.endswith("_main.cfg"):
|
||||
if ("[campaign]" in lines[i] or "[binary_path]" in lines[i] or "[textdomain]" in lines[i]) and not filename.endswith("_main.cfg") and not filename in is_main:
|
||||
is_main.append(filename)
|
||||
if "#textdomain" in lines[i]:
|
||||
textdomains.append(i+1)
|
||||
|
|
Loading…
Add table
Reference in a new issue