Misc Python 3 changes: execfile(), file(), reduce(), StandardError

This commit is contained in:
cclauss
2018-02-09 17:17:05 +01:00
parent 476dbe58c5
commit 260aec543e
6 changed files with 8 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ def has_bom(fn):
return sample.startswith((codecs.BOM_UTF8, codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE))
def popen_wrapper(args, os_err_exc_type=StandardError, stdout_encoding='utf-8'):
def popen_wrapper(args, os_err_exc_type=Exception, stdout_encoding='utf-8'):
"""
Friendly wrapper around Popen.
Returns stdout output, stderr output and OS status code.