Commit 73249a77 authored by Julien Muchembled's avatar Julien Muchembled

publish-early: document a user error

parent 11210de0
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
from collections import OrderedDict from collections import OrderedDict
from .librecipe import unwrap, wrap, GenericSlapRecipe from .librecipe import unwrap, wrap, GenericSlapRecipe
import six import six
from zc.buildout import UserError
def volatileOptions(options, volatile): def volatileOptions(options, volatile):
def copy(): def copy():
...@@ -125,7 +126,8 @@ class Recipe(GenericSlapRecipe): ...@@ -125,7 +126,8 @@ class Recipe(GenericSlapRecipe):
pass pass
buildout.Options = newOptions buildout.Options = newOptions
init_section = buildout[init_section] init_section = buildout[init_section]
assert buildout.Options is Options if buildout.Options is not Options:
raise UserError("%s section was already initialized" % init_section)
new = {} new = {}
for k, v in six.iteritems(init): for k, v in six.iteritems(init):
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment