Python 3 compatibility tests passing.
This commit is contained in:
parent
917389b836
commit
efd187e955
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2015 Elf M. Sternberg
|
# Copyright (C) 2015 Elf M. Sternberg
|
||||||
# Author: Elf M. Sternberg
|
# Author: Elf M. Sternberg
|
||||||
|
|
||||||
|
from functools import reduce
|
||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
# This was a lot shorter and smarter in Hy...
|
# This was a lot shorter and smarter in Hy...
|
||||||
|
|
|
@ -55,16 +55,19 @@ condition = error
|
||||||
# to not have a '.git' directory somewhere lurking in a parent folder.
|
# to not have a '.git' directory somewhere lurking in a parent folder.
|
||||||
|
|
||||||
def shell(cmd, environment=environment):
|
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):
|
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):
|
def fullshell(cmd, environment=environment):
|
||||||
process = subprocess.Popen(cmd, shell=True, env=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()
|
(stdout, stderr) = process.communicate()
|
||||||
return (stdout, stderr, process.returncode)
|
return (stdout, stderr, process.returncode)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue