diff --git a/git_lint/option_handler.py b/git_lint/option_handler.py index 57738d7..d8fe489 100644 --- a/git_lint/option_handler.py +++ b/git_lint/option_handler.py @@ -1,6 +1,7 @@ # Copyright (C) 2015 Elf M. Sternberg # Author: Elf M. Sternberg +from functools import reduce import getopt # This was a lot shorter and smarter in Hy... diff --git a/tests/test_git_lint.py b/tests/test_git_lint.py index 8419357..de820fc 100644 --- a/tests/test_git_lint.py +++ b/tests/test_git_lint.py @@ -55,16 +55,19 @@ condition = error # to not have a '.git' directory somewhere lurking in a parent folder. def shell(cmd, environment=environment): - return subprocess.check_call(cmd, shell=True, env=environment) + return subprocess.check_call(cmd, shell=True, env=environment, + universal_newlines=True) def outshell(cmd, environment=environment): - return subprocess.check_output(cmd, shell=True, env=environment) + return subprocess.check_output(cmd, shell=True, env=environment, + universal_newlines=True) def fullshell(cmd, environment=environment): process = subprocess.Popen(cmd, shell=True, env=environment, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout=subprocess.PIPE, stderr=subprocess.PIPE, + universal_newlines=True) (stdout, stderr) = process.communicate() return (stdout, stderr, process.returncode)