Add context manager methods to subprocess_runner

Change-Id: I77d934fbf018e173bcd919ccabb245ad98e232e6
This commit is contained in:
Dennis Dmitriev 2017-08-28 17:04:18 +03:00
parent 503c35d08c
commit df292ddb54
1 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,12 @@ class Subprocess(six.with_metaclass(metaclasses.SingletonMeta, object)):
"""
pass
def __enter__(self):
return self
def __exit__(self, exc_type, exc_val, exc_tb):
pass
@classmethod
def __exec_command(cls, command, cwd=None, env=None, timeout=None,
verbose=False):