This commit is contained in:
Kovid Goyal 2015-02-26 16:28:54 +05:30
parent 5d2f5bd56e
commit 440d87d627

View File

@ -109,6 +109,8 @@ else:
name, lang = parse_localized_key(k) name, lang = parse_localized_key(k)
if name not in ans: if name not in ans:
ans[name] = {} ans[name] = {}
if isinstance(ans[name], type('')):
ans[name] = {None:ans[name]}
ans[name][lang] = v ans[name][lang] = v
else: else:
ans[k] = v ans[k] = v
@ -223,6 +225,8 @@ else:
try: try:
data = parse_desktop_file(path) data = parse_desktop_file(path)
except Exception: except Exception:
import traceback
traceback.print_exc()
continue continue
if data is not None and mime_types.intersection(data['MimeType']): if data is not None and mime_types.intersection(data['MimeType']):
icon = data.get('Icon', {}).get(None) icon = data.get('Icon', {}).get(None)