mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-01 18:29:54 +00:00
Check that media file exists
This commit is contained in:
1 parent
2e552bb17c
commit
e9d49c91b0
1 file changed
+4
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user