[Bugs] #407 UNSP: Set keyboard layout from control panel
SugarLabs Bugs
bugtracker-noreply at sugarlabs.org
Thu Aug 20 07:38:56 EDT 2009
#407: Set keyboard layout from control panel
------------------------------------------+---------------------------------
Reporter: alsroot | Owner: erikos
Type: defect | Status: assigned
Priority: Unspecified by Maintainer | Milestone: 0.86
Component: sugar | Version: Git as of bugdate
Severity: Unspecified | Resolution:
Keywords: r! | Distribution: SoaS
Status_field: New |
------------------------------------------+---------------------------------
Comment(by erikos):
Sugar-session:
{{{
def setup_keyboard_cb(gconf_client):
logging.debug('STARTUP: setup_keyboard_cb')
try:
...
except:
logging.debug('ERROR in setup_keyboard_cb: %s' %
str(sys.exc_info()))
pass
}}}
I am not a big fan of catching all the errors. Can we split the code and
catch the real errors?
{{{
for layout in layouts:
layouts_list.append(layout.split('(')[0])
variants_list.append(layout.split('(')[1][:-1])
}}}
Is the split save? Maybe you have to catch possible errors here.
{{{
model = gconf_client.get_string(\
'/desktop/sugar/peripherals/keyboard/model')
}}}
Returned None here. I think you have to handle the 'None' or '' case here,
too. I think you can select the default value for the gconf option
accordingly.
--
Ticket URL: <http://trac.sugarlabs.org/ticket/407#comment:14>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list