Opened 11 years ago

Closed 11 years ago

#4475 closed defect (fixed)

del of none-existant option entry causes controlpanel to crash

Reported by: walter Owned by: erikos
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed


Ignacio stumbled across this problem with the Sugar control panel. Using sugar-emulator on F18 (perhaps with some missing dependency) sr/jarabe/controlpanel/ crashes when trying to delete 'power' from self._options when it is not present. Same is true for 'keyboard'.

With the proper dependencies (sugar-cp and xklavier) loaded, the problem goes away. But the code could be more robust.

A simple solution would be to add a check before del, e.g.,

+ if 'power' in self._options:
+ del self._optionspower?


+ if 'keyboard' in self._options:
+ del self._optionskeyboard?

Log attached

Attachments (1)

shell.log (4.8 KB) - added by walter 11 years ago.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by walter

comment:1 Changed 11 years ago by dnarvaez

  • Resolution set to fixed
  • Status changed from new to closed

I suspect this is now fixed because the xklavier stuff has been made non-optional. It will fail at the import if you don't have xklavier installed but I think that's the right thing do. IMO better to fail hard when something is wrong that to sort of work, hence I don't think the None check would have been a good idea anyway.

Note: See TracTickets for help on using tickets.