* 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:
parent
4b68c57530
commit
fdfa461cf1
@ -1,6 +1,8 @@
|
||||
2008-01-16 Martin Hawlisch <martin@hawlisch.de>
|
||||
* src/plugins/DateParserDisplayTest.py: Use Tool.ToolOptions instead of
|
||||
None as options_class to make it no longer crash
|
||||
* src/Mime/_PythonMime.py: Avoid crash on Windows if the mime type for
|
||||
a folder is to be determined
|
||||
|
||||
2008-01-16 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
* src/Editors/_EditMediaRef.py:
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user