Commit ed0e6b41 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

recipe/equeue: raise error as soon as __init__

parent 02a0acd5
......@@ -25,14 +25,16 @@
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
from zc.buildout import UserError
class Recipe(GenericBaseRecipe):
def install(self):
if not self.options['lockfile'].endswith('.lock'):
raise ValueError('lockfile parameter must end with .lock as equeue process will add .lock suffix')
def __init__(self, buildout, name, options):
if not options['lockfile'].endswith('.lock'):
raise UserError('lockfile parameter must end with .lock as equeue process will add .lock suffix')
super(Recipe, self).__init__(buildout, name, options)
def install(self):
args = [
self.options['equeue-binary'],
'--database', self.options['database'],
......
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