Commit 9b5c5fd3 authored by Chris Lamb's avatar Chris Lamb 💬

Add support for easily masking the standard error of commands.

parent 9f607241
......@@ -26,6 +26,7 @@ logger = logging.getLogger(__name__)
class Command(metaclass=abc.ABCMeta):
MASK_STDERR = False
MAX_STDERR_LINES = 50
def __init__(self, path):
......@@ -91,6 +92,9 @@ class Command(metaclass=abc.ABCMeta):
pass
def _read_stderr(self):
if self.MASK_STDERR:
return ""
buf = ""
lines = self._process.stderr.splitlines(True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment