Commits

Armin Rigo committed b1a9d9b

Test and fix.

Comments (0)

Files changed (2)

pypy/config/parse.py

     """See test_parse.py."""
     text = text.lstrip()
     result = {}
-    if text.startswith('['):
-        # new format
+    if (text+':').index(':') > (text+'=').index('='):
+        # found a '=' before a ':' means that we have the new format
         current = {0: ''}
         indentation_prefix = None
         for line in text.splitlines():

pypy/config/test/test_parse.py

         'objspace.x': 'hello',
         })
 
+    assert parse_info("simple = 43\n") == {'simple': 43}
+
+
 def test_parse_old_format():
     assert (parse_info("                          objspace.allworkingmodules: True\n"
                        "                    objspace.disable_call_speedhacks: False\n"