* src/Mime/_PythonMime.py: Avoid crash on Windows if the mime type for a folder is to be determined

svn: r9844
This commit is contained in:
Martin Hawlisch
2008-01-16 13:16:58 +00:00
parent 4b68c57530
commit fdfa461cf1
2 changed files with 3 additions and 1 deletions

View File

@@ -55,7 +55,7 @@ def get_description(mime_type):
def get_type(filename):
"""Returns the mime type of the specified file"""
value = mimetypes.guess_type(filename)
if value:
if value and value[0]:
return value[0]
else:
return _('unknown')