mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove unused __popen DI
This commit is contained in:
parent
520604939a
commit
e55f51fb14
1 changed files with 1 additions and 2 deletions
|
|
@ -144,7 +144,6 @@ class CalledProcessError(RuntimeError):
|
|||
def cmd_output(*cmd, **kwargs):
|
||||
retcode = kwargs.pop('retcode', 0)
|
||||
encoding = kwargs.pop('encoding', 'UTF-8')
|
||||
__popen = kwargs.pop('__popen', subprocess.Popen)
|
||||
|
||||
popen_kwargs = {
|
||||
'stdin': subprocess.PIPE,
|
||||
|
|
@ -165,7 +164,7 @@ def cmd_output(*cmd, **kwargs):
|
|||
returncode, stdout, stderr = e.to_output()
|
||||
else:
|
||||
popen_kwargs.update(kwargs)
|
||||
proc = __popen(cmd, **popen_kwargs)
|
||||
proc = subprocess.Popen(cmd, **popen_kwargs)
|
||||
stdout, stderr = proc.communicate()
|
||||
returncode = proc.returncode
|
||||
if encoding is not None and stdout is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue