MrMEEE/ironhide — Issue #129: ironhide-indicator crashes when reading wrong desktop file
Author: abranches
Created: 2011-10-18 21:54:07+00:00
State: open

Hello,

I installed ironhide by the ppa in Ubuntu 11.04. When going to "Configure apps" in the ironhide-indicator, it crashes with the exception:

Using configuration file: /home/pedro/.ironhide-uirc
Traceback (most recent call last):
File "/usr/bin/ironhide-indicator", line 169, in app_configure
Applications_settings(file_set=file_set)
File "/usr/share/ironhide-ui/app/AppSettings.py", line 121, in __init__
self.build_app_list()
File "/usr/share/ironhide-ui/app/AppSettings.py", line 220, in build_app_list
for app_info in self.file_set.get_apps_info():
File "/usr/share/ironhide-ui/app/DesktopFile.py", line 84, in get_apps_info
app_config = desktop_file.get_app_config()
File "/usr/share/ironhide-ui/app/DesktopFile.py", line 171, in get_app_config
self.app_exec= self.config.get('Desktop Entry','Exec')
File "/usr/lib/python2.7/ConfigParser.py", line 610, in get
raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'Exec' in section: 'Desktop Entry'

I investigated the problem and found out that this happens because it tries to read a .desktop file that isn't executable(the ones that don't contain the Exec section), like the ~/examples.desktop file that comes by default with Ubuntu.

I attached a simple solution to the bug.