Trap exception on tag

main
Bob Mottram 2020-09-12 10:50:24 +01:00
parent e12b6483c3
commit 3ea12bc145
1 changed files with 4 additions and 1 deletions

View File

@ -890,7 +890,10 @@ def removeTagsForNickname(baseDir: str, nickname: str,
filename = os.fsdecode(f)
if not filename.endswith(".txt"):
continue
try:
tagFilename = os.path.join(directory, filename)
except BaseException:
continue
if not os.path.isfile(tagFilename):
continue
if matchStr not in open(tagFilename).read():