comparison piecrust/commands/base.py @ 663:3ceeca7bb71c

themes: Add support for a `--theme` argument to `chef`.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 01 Mar 2016 22:27:28 -0800
parents 456db44dcc53
children 4850f8c21b6e
comparison
equal deleted inserted replaced
662:cbd5cdec0695 663:3ceeca7bb71c
30 raise NotImplementedError("Command '%s' doesn't implement the `run` " 30 raise NotImplementedError("Command '%s' doesn't implement the `run` "
31 "method." % type(self)) 31 "method." % type(self))
32 32
33 def checkedRun(self, ctx): 33 def checkedRun(self, ctx):
34 if ctx.app.root_dir is None and self.requires_website: 34 if ctx.app.root_dir is None and self.requires_website:
35 raise SiteNotFoundError() 35 raise SiteNotFoundError(theme=ctx.app.theme_site)
36 return self.run(ctx) 36 return self.run(ctx)
37 37
38 38
39 class ExtendableChefCommand(ChefCommand): 39 class ExtendableChefCommand(ChefCommand):
40 def __init__(self): 40 def __init__(self):