Mercurial > kallithea
changeset 2399:a8635cdab3c0 beta
Add optional parameters to subprocessio that allow passing params to Popen
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 06 Jun 2012 17:55:19 +0200 |
parents | 378b0247e938 |
children | e87c6aa9c5e7 |
files | rhodecode/lib/subprocessio.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/subprocessio.py Wed Jun 06 14:23:40 2012 +0200 +++ b/rhodecode/lib/subprocessio.py Wed Jun 06 17:55:19 2012 +0200 @@ -276,7 +276,7 @@ return self.data[i] -class SubprocessIOChunker(): +class SubprocessIOChunker(object): ''' Processor class wrapping handling of subprocess IO. @@ -321,7 +321,7 @@ ''' def __init__(self, cmd, inputstream=None, buffer_size=65536, - chunk_size=4096, starting_values=[]): + chunk_size=4096, starting_values=[], **kwargs): ''' Initializes SubprocessIOChunker @@ -342,7 +342,8 @@ shell=True, stdin=inputstream, stdout=subprocess.PIPE, - stderr=subprocess.PIPE + stderr=subprocess.PIPE, + **kwargs ) bg_out = BufferedGenerator(_p.stdout, buffer_size, chunk_size, starting_values)