Commit c89c7a0a authored by Xavier Thompson's avatar Xavier Thompson

slapformat: WIP: Fix conf.wrong method

parent 575563a4
......@@ -126,10 +126,10 @@ class FormatConfig(Parameters, Options):
def __init__(self):
self.logger = logging.getLogger("slapos.format")
def abort(self, fmt, *args):
def abort(self, fmt, *args, exc=ValueError):
message = fmt % tuple(args)
self.logger.error(message)
raise ValueError(message)
raise exc(message)
def wrong(self, fmt, *args):
return self.abort(fmt, *args, exc=UsageError)
......
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