Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
slapos.buildout
Commits
9166c4aa
Commit
9166c4aa
authored
Jan 12, 2013
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: Blank lines in buildout configuration file sections before
options were treated as errors.
parent
ec580017
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
2 deletions
+41
-2
CHANGES.rst
CHANGES.rst
+6
-0
setup.py
setup.py
+1
-1
src/zc/buildout/configparser.py
src/zc/buildout/configparser.py
+3
-0
src/zc/buildout/configparser.test
src/zc/buildout/configparser.test
+31
-1
No files found.
CHANGES.rst
View file @
9166c4aa
Change History
**************
2.0.0a7 (2013-01-12)
====================
Fixed: Blank lines in buildout configuration file sections before
options were treated as errors.
2.0.0a6 (2013-01-11)
====================
...
...
setup.py
View file @
9166c4aa
...
...
@@ -12,7 +12,7 @@
#
##############################################################################
name
=
"zc.buildout"
version
=
"2.0.0a
6
"
version
=
"2.0.0a
7
"
import
os
from
setuptools
import
setup
...
...
src/zc/buildout/configparser.py
View file @
9166c4aa
...
...
@@ -139,6 +139,9 @@ def parse(fp, fpname):
optval = optval.strip()
cursect[optname] = optval
blockmode = not optval
elif not (optname or line.strip()):
# blank line after section start
continue
else:
# a non-fatal parsing error occurred. set up the
# exception but keep going. the exception will be
...
...
src/zc/buildout/configparser.test
View file @
9166c4aa
...
...
@@ -57,5 +57,35 @@ Here's an example with leading blank lines:
... text), '
test
'))
{'
buildout
': {'
z
': '
1
'}}
Some
examples
that
should
error
:
From email:
"It fails when the first non-comment line after a section (even an
otherwise empty section) is blank. For example:"
[buildout]
parts = hello
versions = versions
[versions]
# Add any version pins here.
[hello]
recipe = collective.recipe.cmd
on_install = true
on_update = true
cmds = echo Hello
.. -> text
>>> pprint.pprint(zc.buildout.configparser.parse(StringIO.StringIO(
... text), '
test
'))
{'
buildout
': {'
parts
': '
hello
', '
versions
': '
versions
'},
'
hello
': {'
cmds
': '
echo
Hello
',
'
on_install
': '
true
',
'
on_update
': '
true
',
'
recipe
': '
collective
.
recipe
.
cmd
'},
'
versions
'
:
{}}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment