[Patches] [ python-Patches-1524825 ] ConfigParser: accept leading whitespace on options+comments
SourceForge.net
noreply at sourceforge.net
Mon Jul 31 22:53:29 CEST 2006
Patches item #1524825, was opened at 2006-07-18 17:17
Message generated for change (Comment added) made by whit537
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1524825&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ken Lalonde (kenlalonde)
Assigned to: Nobody/Anonymous (nobody)
Summary: ConfigParser: accept leading whitespace on options+comments
Initial Comment:
ConfigParser considers leading white space before
options and comments to be syntax errors, which is a
bit harsh, and limits the utility of the module when
parsing files originally written for other programs,
such as Samba's smb.conf.
The attached patch ignores leading white space on
options, and skips comments with leading w.s.
----------------------------------------------------------------------
Comment By: Chad Whitacre (whit537)
Date: 2006-07-31 16:53
Message:
Logged In: YES
user_id=340931
Thanks for the patch Ken! This change sounds reasonable and
low-risk. However, some patch suggestions:
1. Diff against HEAD of trunk/ from svn, not your platform's
python installation
2. Add some tests in Lib/test/test_cfgparser.py (this will
be in a source distribution from svn, but not in your
platform's binary distribution)
3. Update the doc in Doc/lib/libcfgparser.tex (again, this
will be in a source dist)
FWIW, these are mentioned in the (admittedly somewhat
obtuse) patch guidelines:
http://www.python.org/dev/patches/
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1524825&group_id=5470
More information about the Patches
mailing list