fix guess(non-string) with Python 3.6

The os.path.* functions now consistently raise TypeError rather than something
more random when called with inappropriate types.

Fixes #6
This commit is contained in:
Michael Hudson-Doyle 2017-07-14 11:15:25 +12:00
parent f3f06f372f
commit 21cfd681b9
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ def guess(fname):
'''
try:
stem, ext = os.path.splitext(fname)
except AttributeError:
except (AttributeError, TypeError):
return None
if not ext: