diff --git a/media.py b/media.py index eb0df3d43..66b6823e3 100644 --- a/media.py +++ b/media.py @@ -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):