delete check_output backport: Python 2.6 no longer supported

This commit is contained in:
Joy Chen 2016-12-03 15:57:20 -06:00
parent ecfa397567
commit 97a9fea89d
1 changed files with 0 additions and 15 deletions

View File

@ -49,21 +49,6 @@ client = zulip.Client(
api_key=config.ZULIP_API_KEY,
client="ZulipGit/" + VERSION)
# check_output is backported from subprocess.py in Python 2.7
def check_output(*popenargs, **kwargs):
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise subprocess.CalledProcessError(retcode, cmd, output=output)
return output
subprocess.check_output = check_output
def git_repository_name():
output = subprocess.check_output(["git", "rev-parse", "--is-bare-repository"])
if output.strip() == "true":