diff --git a/scripts/pepper b/scripts/pepper index 9d9c137..0e69e31 100755 --- a/scripts/pepper +++ b/scripts/pepper @@ -33,7 +33,10 @@ logger.addHandler(NullHandler()) class Pepper(object): def __init__(self): self.cli = PepperCli() - self.opts = salt.config.client_config(self.cli.options.master) + if HAS_SALT: + self.opts = salt.config.client_config(self.cli.options.master) + else: + self.opts = {} @property def output(self): @@ -48,7 +51,7 @@ class Pepper(object): def __call__(self): try: for exit_code, result in self.cli.run(): - if HAS_SALT: + if HAS_SALT and self.opts: logger.info('Use Salt outputters') for ret in json.loads(result)['return']: if isinstance(ret, dict):