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

recipe/equeue: raise error as soon as __init__

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