Public bug reported: DesktopEntry.py says: def getMimeType(self): return self.get('MimeType', list=True, type="regex")
However, the MimeType field is not a regexp according to eg http://standards.freedesktop.org/desktop-entry-spec/0.9.5/ar01s07.html Callers will have to have been expecting to treat the result like a compiled re (eg, by calling .match). However, they are also entitled to look inside and see re.pattern and some callers (eg, gnome-app-install) know that there is this lack of quoting bug in pygtk So there is no good answer to this. Perhaps it would be best to invent a getMimeTypeStringList and deprecate the old method. There are some cryptic comments in DesktopEntry.py relating to deprecation of MimeType. To reproduce at least one of the symptoms: gnome-app-install --mime-type=text/vndXwapYwml and observe that an XML editor is offered when in fact no application should be found. Note that the fix should arrange that gnome-app-install and then typing text/vnd.wap.wml into the search box should still find the XML editor. ** Affects: pygtk (Ubuntu) Importance: Untriaged Status: Unconfirmed -- MimeType values in .desktop files are not regexps https://launchpad.net/bugs/57205 -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs