Implement the thing. Test passes now, though not pleasantly.
Chris Pressey
2 years ago
593 | 593 | def is_available(self): |
594 | 594 | if not self.gating_command: |
595 | 595 | return True |
596 | raise NotImplementedError("Gating by gating command not implemented") | |
596 | pipe = Popen( | |
597 | self.gating_command, shell=True, | |
598 | stdin=PIPE, stdout=PIPE, stderr=PIPE | |
599 | ) | |
600 | outputs = pipe.communicate() | |
601 | return pipe.returncode == 0 | |
597 | 602 | |
598 | 603 | def subst(self, command, var_name, value): |
599 | 604 | """Replace all occurrences of `var_name` in `command` with |