]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
Properties in the "Rodelbahnbox" accept the "=" sign now.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Wed, 1 Dec 2010 18:52:05 +0000 (18:52 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Wed, 1 Dec 2010 18:52:05 +0000 (18:52 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/trunk/wradmin@681 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wradmin/wradmin/lib/mediawiki.py

index 7a29085e3b4f37020495cf1ab21f71889eb45d5a..30c8ba9aa638fb81b94e5b85db63dd551fe7ccfd 100644 (file)
@@ -119,11 +119,11 @@ def wikipage_to_wrsleddingcache(page_id, page_title, page_text):
     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'