We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab39a7b commit 5a486e9Copy full SHA for 5a486e9
scripts/pepper
@@ -33,7 +33,10 @@ logger.addHandler(NullHandler())
33
class Pepper(object):
34
def __init__(self):
35
self.cli = PepperCli()
36
- self.opts = salt.config.client_config(self.cli.options.master)
+ if HAS_SALT:
37
+ self.opts = salt.config.client_config(self.cli.options.master)
38
+ else:
39
+ self.opts = {}
40
41
@property
42
def output(self):
@@ -48,7 +51,7 @@ class Pepper(object):
48
51
def __call__(self):
49
52
try:
50
53
for exit_code, result in self.cli.run():
- if HAS_SALT:
54
+ if HAS_SALT and self.opts:
55
logger.info('Use Salt outputters')
56
for ret in json.loads(result)['return']:
57
if isinstance(ret, dict):
0 commit comments