Skip to content

Commit

Permalink
quick fix for #1713
Browse files Browse the repository at this point in the history
  • Loading branch information
quartata committed Mar 15, 2018
1 parent 04031c5 commit 8f8eaa0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions blacklists.py
Expand Up @@ -50,10 +50,12 @@ def remove(self, item: str):
f.writelines(items)

def exists(self, item: str):
item = item.lower()

with open(self._filename, 'r', encoding='utf-8') as f:
lines = f.readlines()
for i, x in enumerate(lines):
if item in x:
if item in x.lower():
return True, i + 1

return False, -1
Expand Down Expand Up @@ -99,10 +101,12 @@ def exists(self, item: Union[str, dict]):
if isinstance(item, dict):
item = item[2]

item = item.lower()

with open(self._filename, 'r', encoding='utf-8') as f:
lines = f.readlines()
for i, x in enumerate(lines):
if item in x:
if item in x.lower():
return True, i + 1

return False, -1
Expand Down

0 comments on commit 8f8eaa0

Please sign in to comment.