This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | msuchy |
|---|---|
| Recipients | msuchy |
| Date | 2007年12月31日.15:30:00 |
| SpamBayes Score | 0.19020365 |
| Marked as misclassified | No |
| Message-id | <1199115002.03.0.289718233868.issue1714@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I have some configuration params with leading space. And program
(getmail4) which use ConfigParser.py. ConfigParser strip all leading
(and trailing) spaces from values. This is very often the most wanted
result. But if I want value with leading space I have no option to put
it there.
Therefore I suggest to optionaly write string value as
key = "value"
This patch will solve it (it is against my OS, sorry no chance to
checkout svn).
--- /usr/lib/python2.4/ConfigParser.py.orig 2007年12月31日
16:04:32.000000000 +0100
+++ /usr/lib/python2.4/ConfigParser.py 2007年12月31日 16:06:50.000000000 +0100
@@ -472,6 +472,7 @@
if pos != -1 and optval[pos-1].isspace():
optval = optval[:pos]
optval = optval.strip()
+ optval = optval.strip('"')
# allow empty values
if optval == '""':
optval = '' |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2007年12月31日 15:30:02 | msuchy | set | spambayes_score: 0.190204 -> 0.19020365 recipients: + msuchy |
| 2007年12月31日 15:30:02 | msuchy | set | spambayes_score: 0.190204 -> 0.190204 messageid: <1199115002.03.0.289718233868.issue1714@psf.upfronthosting.co.za> |
| 2007年12月31日 15:30:01 | msuchy | link | issue1714 messages |
| 2007年12月31日 15:30:00 | msuchy | create | |