Removed unused os_err_exc_type kwarg from core.management.utils.popen_wrapper().

Unused since its introduction in 7fca4416c7.
This commit is contained in:
Jon Dufresne 2018-01-31 07:02:01 -08:00 committed by Tim Graham
parent 0a37ea56d0
commit 8f14ed6c81
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ from django.utils.encoding import DEFAULT_LOCALE_ENCODING, force_text
from .base import CommandError
def popen_wrapper(args, os_err_exc_type=CommandError, stdout_encoding='utf-8'):
def popen_wrapper(args, stdout_encoding='utf-8'):
"""
Friendly wrapper around Popen.
@ -17,7 +17,7 @@ def popen_wrapper(args, os_err_exc_type=CommandError, stdout_encoding='utf-8'):
try:
p = Popen(args, shell=False, stdout=PIPE, stderr=PIPE, close_fds=os.name != 'nt')
except OSError as err:
raise os_err_exc_type('Error executing %s' % args[0]) from err
raise CommandError('Error executing %s' % args[0]) from err
output, errors = p.communicate()
return (
force_text(output, stdout_encoding, strings_only=True, errors='strict'),