From 77d11cd30079bc9a1bcc72b1c90f21a87d93011f Mon Sep 17 00:00:00 2001 From: Joy Chen Date: Sat, 3 Dec 2016 15:57:20 -0600 Subject: [PATCH] delete check_output backport: Python 2.6 no longer supported --- integrations/git/post-receive | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/integrations/git/post-receive b/integrations/git/post-receive index 51296a9..0e8c088 100755 --- a/integrations/git/post-receive +++ b/integrations/git/post-receive @@ -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":