1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 04:20:22 +01:00

Make the templating system more robust to custom fields

This commit is contained in:
David Paleino
2011-12-16 21:47:07 +01:00
parent 88463f7ced
commit 4d002b9634
2 changed files with 8 additions and 2 deletions

View File

@@ -403,7 +403,10 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
for type_ in ['required', 'optional']:
fields = methods[ID][type_]
for field in fields:
edit = MaskingEdit(('editcp',language[field[1].lower().replace(' ','_')]+': '))
try:
edit = MaskingEdit(('editcp',language[field[1].lower().replace(' ','_')]+': '))
except KeyError:
edit = MaskingEdit(('editcp',field[1].replace(' ','_')+': '))
edit.set_mask_mode('no_focus')
theList.append(edit)
# Add the data to any array, so that the information