1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-20 04:48:00 +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

@@ -536,7 +536,10 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
for type_ in ['required', 'optional']:
fields = methods[ID][type_]
for field in fields:
field_text = language[field[1].lower().replace(' ','_')]
try:
field_text = language[field[1].lower().replace(' ','_')]
except KeyError:
field_text = field[1].replace(' ','_')
if field in methods[ID]['protected']:
box = ProtectedLabelEntry(field_text)