mirror of https://github.com/python/cpython
allow comments beginning with ; in key: value as well as key = value
This commit is contained in:
parent
1b7a70fa52
commit
820314ea95
|
@ -358,7 +358,7 @@ class ConfigParser:
|
|||
if mo:
|
||||
optname, vi, optval = mo.group('option', 'vi', 'value')
|
||||
optname = string.lower(optname)
|
||||
if vi == '=' and ';' in optval:
|
||||
if vi in ('=', ':') and ';' in optval:
|
||||
# ';' is a comment delimiter only if it follows
|
||||
# a spacing character
|
||||
pos = string.find(optval, ';')
|
||||
|
|
Loading…
Reference in New Issue