for property in box.split('|'):
property = property.strip()
if property == u'Rodelbahnbox': continue
- key_value = property.split('=')
- if len(key_value) != 2:
- raise RuntimeError(u"Die Eigenschaft '%s' hat ein unerwartetes Format." % key_value)
- key = key_value[0].strip()
- value = key_value[1].strip()
+ equalsign_pos = property.find('=')
+ if equalsign_pos < 0:
+ raise RuntimeError(u"Die Eigenschaft '%s' hat ein unerwartetes Format." % property)
+ key = property[:equalsign_pos].strip()
+ value = property[equalsign_pos+1:].strip()
if key in [u'Rodelbahnnummer', u'Lift']:
errors.append("Eigenschaft '%s' wird nicht mehr unterstuetzt, siehe %s." % (key, 'http://www.winterrodeln.org/wiki/Vorlage:Rodelbahnbox'))
elif key == u'Position': sl.position_latitude, sl.position_longitude = conv(model.validators.GeoNone().to_python, value, key) # '47.583333 N 15.75 E'