From 22360c908a7d982c5891bf0be76088583100e631 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 27 Nov 2019 09:51:59 +0000 Subject: [PATCH] Check that tag file exists --- person.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/person.py b/person.py index a67c603a..e8c4fbe6 100644 --- a/person.py +++ b/person.py @@ -661,6 +661,8 @@ def removeTagsForNickname(baseDir: str,nickname: str,domain: str,port: int) -> N if not filename.endswith(".txt"): continue tagFilename=os.path.join(baseDir+'/accounts/',filename) + if not os.path.isfile(tagFilename): + continue if matchStr not in open(tagFilename).read(): continue with open(tagFilename, "r") as f: