forked from indymedia/epicyon
Check that file exists
parent
de1bfa8ed4
commit
b2658ebc31
|
@ -93,6 +93,9 @@ def isFilteredBase(filename: str, content: str) -> bool:
|
||||||
"""Uses the given file containing filtered words to check
|
"""Uses the given file containing filtered words to check
|
||||||
the given content
|
the given content
|
||||||
"""
|
"""
|
||||||
|
if not os.path.isfile(filename):
|
||||||
|
return False
|
||||||
|
|
||||||
with open(filename, 'r') as fp:
|
with open(filename, 'r') as fp:
|
||||||
for line in fp:
|
for line in fp:
|
||||||
filterStr = line.replace('\n', '').replace('\r', '')
|
filterStr = line.replace('\n', '').replace('\r', '')
|
||||||
|
|
Loading…
Reference in New Issue