Check that file exists

merge-requests/30/head
Bob Mottram 2021-03-15 16:49:31 +00:00
parent f89b0928e7
commit 7e0d052006
1 changed files with 2 additions and 2 deletions

View File

@ -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) + ' | ' +