5291: JPG is not imported

svn: r18458
This commit is contained in:
Michiel Nauta 2011-11-16 17:59:43 +00:00
parent e5e0f393d7
commit e0a9dad593

View File

@ -47,9 +47,12 @@ def get_description(mime_type):
progid = _get_prog_id(extension)
if progid:
hcr = ConnectRegistry(None, HKEY_CLASSES_ROOT)
desc = QueryValue(hcr, progid)
CloseKey(hcr)
try:
hcr = ConnectRegistry(None, HKEY_CLASSES_ROOT)
desc = QueryValue(hcr, progid)
CloseKey(hcr)
except WindowsError:
pass
if not desc:
desc = _("unknown")