Skip to content

Commit 3774f3e

Browse files
committed
skip unknown filetypes instead of erroring
1 parent ff143df commit 3774f3e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pythonbits/bb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,8 @@ def _render_mediainfo_path(self):
956956
# get first file over 1 MiB
957957
for dp, dns, fns in os.walk(self['path']):
958958
for fn in fns:
959-
if guess_type(fn)[0].startswith('audio'):
959+
g = guess_type(fn)[0]
960+
if g and g.startswith('audio'):
960961
return os.path.join(dp, fn) # return full path
961962
raise Exception('No media file found')
962963

0 commit comments

Comments
 (0)