Conditions | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import pipes |
||
36 | def chef_installed(self): |
||
37 | knife = "/opt/chef/bin/knife" |
||
38 | command = "test -x %s" % (pipes.quote(knife)) |
||
39 | version = self.options['version'] |
||
40 | |||
41 | if version: |
||
42 | command += (" && %s --version | grep %s" % |
||
43 | (pipes.quote(knife), |
||
44 | pipes.quote('Chef: %s' % (version)))) |
||
45 | |||
46 | exit_code = shell.shell_out(command) |
||
47 | return exit_code == 0 |
||
48 | |||
51 |