Commit aae34ad7 authored by Vincent Pelletier's avatar Vincent Pelletier

Raise UserError instead of Exception.

Buildout output is less scary this way.
parent 02d53a7e
......@@ -25,6 +25,7 @@
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
from zc.buildout import UserError
class Recipe(GenericBaseRecipe):
"""
......@@ -79,7 +80,7 @@ class Recipe(GenericBaseRecipe):
if not backend_dict:
# Fail installation if backend_dict is empty, otherwise partition may be
# advertised as available although it provides no service.
raise Exception('backend-dict is empty')
raise UserError('backend-dict is empty')
server_snippet_filename = self.getTemplateFilename(
'haproxy-server-snippet.cfg.in')
......
......@@ -25,6 +25,7 @@
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
from zc.buildout import UserError
class NeoBaseRecipe(GenericBaseRecipe):
......@@ -39,7 +40,7 @@ class NeoBaseRecipe(GenericBaseRecipe):
# allocated.
# Only then can this recipe start succeeding and actually doing anything
# useful, as per NEO deploying constraints.
raise Exception('"masters" parameter is mandatory')
raise UserError('"masters" parameter is mandatory')
option_list = [
options['binary'],
'-l', options['logfile'],
......
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