if len(wrong_properties) > 0:
raise RuntimeError("The attribute '{}' is not allowed at <{}>.".format(list(wrong_properties)[0], feature.tag))
if feature.attrib.has_key('farbe'):
if len(wrong_properties) > 0:
raise RuntimeError("The attribute '{}' is not allowed at <{}>.".format(list(wrong_properties)[0], feature.tag))
if feature.attrib.has_key('farbe'):
+ if not re.match('#[0-9a-fA-F]{6}$', feature.attrib['farbe']):
+ raise RuntimeError('The attribute "farbe" has to have a format like "#a0bb43".')
properties['strokeColor'] = feature.attrib['farbe'] # e.g. #a200b7
if feature.attrib.has_key('dicke'):
try:
properties['strokeColor'] = feature.attrib['farbe'] # e.g. #a200b7
if feature.attrib.has_key('dicke'):
try: