Skip to content
Snippets Groups Projects
Commit 9b5c5fd3 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Add support for easily masking the standard error of commands.

parent 9f607241
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment