You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
removed quotation marks if writing keys containing equal sign and "less than" sign #273
If a key contains an equal sign surrounded by a "less than" and "greater than" sign, then no quotation marks are written, resulting in an unreadable file.
If you run the script the first time, it changes the configuration file to:
x <a='b'> = c
If you run the same script another time, an exception is raised:
Traceback (most recent call last):
File "/home/user/configtest.py", line 3, in <module>
config = configobj.ConfigObj("test.conf")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1228, in __init__
self._load(infile, configspec)
File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1317, in _load
raise error
configobj.ParseError: Parse error in value at line 1.
Note that the key in this example is shortened to show the issue, but not a real world example.
Activity