Trap exception on tag

merge-requests/8/head
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
tagFilename = os.path.join(directory, filename)
try:
tagFilename = os.path.join(directory, filename)
except BaseException:
continue
if not os.path.isfile(tagFilename):
continue
if matchStr not in open(tagFilename).read():