Don't assume that the file exists

merge-requests/30/head
Bob Mottram 2021-03-15 11:38:34 +00:00
parent a730aa8450
commit 8268b1b2c8
1 changed files with 2 additions and 0 deletions

View File

@ -381,6 +381,8 @@ def _showLocalBox(boxName: str,
os.path.join(msgDir, os.path.join(msgDir,
publishedYear + '/' + publishedYear + '/' +
publishedMonth + '/' + index[pos]) publishedMonth + '/' + index[pos])
if not os.path.isfile(speakerJsonFilename):
continue
speakerJson = loadJson(speakerJsonFilename) speakerJson = loadJson(speakerJsonFilename)
if not speakerJson.get('published'): if not speakerJson.get('published'):
continue continue