Commit c525ba9b authored by Chris Lamb's avatar Chris Lamb 👀
Browse files

Add ability to pass (byte)string input to external commands.

parent 138aac1a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ class Command(metaclass=abc.ABCMeta):
            shell=False,
            close_fds=True,
            env=self.env(),
            input=self.input(),
            stdin=self._stdin,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
@@ -84,6 +85,9 @@ class Command(metaclass=abc.ABCMeta):
    def terminate(self):
        pass

    def input(self):
        pass

    def _read_stderr(self):
        if self.MASK_STDERR:
            return ""