From 7e0d052006b5718c081b0bbc746b46b14c756828 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 15 Mar 2021 16:49:31 +0000 Subject: [PATCH] Check that file exists --- notifications_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notifications_client.py b/notifications_client.py index c93f27e6a..130074d4f 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -329,6 +329,8 @@ def _getSpeakerJsonFromIndex(boxName: str, index: int) -> {}: publishedYear + '/' + publishedMonth + '/' + indexList[index]) + if not os.path.isfile(speakerJsonFilename): + return None return loadJson(speakerJsonFilename) @@ -441,8 +443,6 @@ def _showLocalBox(boxName: str, content += ' ' if speakerJson.get('detectedLinks'): if len(speakerJson['detectedLinks']) > 0: - print("speakerJson['detectedLinks']: " + - str(speakerJson['detectedLinks'])) content = '🔗' + content content = (content[:40]) if len(content) > 40 else content print(indent + str(posStr) + ' | ' + str(name) + ' | ' +