Check that media file exists

main
Bob Mottram 2021-03-06 23:03:14 +00:00
parent 2e552bb17c
commit e9d49c91b0
1 changed files with 4 additions and 0 deletions

View File

@ -54,6 +54,10 @@ def removeMetaData(imageFilename: str, outputFilename: str) -> None:
def _isMedia(imageFilename: str) -> bool:
"""Is the given file a media file?
"""
if not os.path.isfile(_isMedia):
return False
permittedMedia = getMediaExtensions()
for m in permittedMedia:
if imageFilename.endswith('.' + m):