error on parsing empty application name from malformed desktop entry
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Framework |
Fix Released
|
Medium
|
Siegfried Gevatter |
Bug Description
I've got a malformed Desktop Entry installed user-related; malformed because the "Exec=*" line in it doesn't have any application string defined and it should [1]. Anyway, it's there, malformed, and raises an error.
****************
Traceback (most recent call last):
File "/home/
events = self._sources_
File "/home/
return self._get_items()
File "/home/
desktopfile = self._find_
File "/home/
line.split("=", 1)[-1].
IndexError: list index out of range
**************
Fix :
replace lines ~261 in _zeitgeist/
from
---
if line.startswith
line.split("=", 1)[-1].
return unicode(fullname)
---
to
---
execlinepattern = re.compile(
if execlinepattern
line.split("=", 1)[-1].
return unicode(fullname)
---
Feel free to push the pattern upward to optimise.
One could even use full regexp extraction to get the application, but I'm not familiar enough with python to code it.
Appears on zeitgeist trunk and ubuntu jaunty PPA package.
[1] http://
Fixed, thanks.