mirror of https://github.com/zulip/zulip.git
Make tools/post-receive python 3 compatible.
This commit is contained in:
parent
00a120c34f
commit
1a77b599f6
|
@ -33,7 +33,8 @@ import os
|
|||
import sys
|
||||
import subprocess
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
from zulip_tools import ENDC, FAIL
|
||||
from zerver.lib.str_utils import force_str
|
||||
from zulip_tools import ENDC, FAIL, subprocess_text_output
|
||||
|
||||
def update_deployment(server, refname):
|
||||
return subprocess.call(["ssh", "-l", "zulip", server, "--", "env", "-u", "GIT_DIR",
|
||||
|
@ -43,7 +44,7 @@ def send_deployment_finished_message(branch, message):
|
|||
subprocess.check_call(["/home/zulip/zulip/api/bin/zulip-send", "--user=commit-bot@zulip.com",
|
||||
"--api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "--stream=commits",
|
||||
"--site=https://zulip.com",
|
||||
(u"--subject=%s" % (branch,)).encode("utf-8"), "--message=%s" % (message,)])
|
||||
force_str(u"--subject=%s" % (branch,)), "--message=%s" % (message,)])
|
||||
|
||||
deployments = {
|
||||
'refs/heads/prod': ('prod0.zulip.net', 'prod'),
|
||||
|
@ -71,7 +72,7 @@ for ln in sys.stdin:
|
|||
# 00...0 means we're deleting the ref
|
||||
commits = ''
|
||||
else:
|
||||
commits = subprocess.check_output(["git", "log", "%s..%s" % (oldrev, newrev)])
|
||||
commits = subprocess_text_output(["git", "log", "%s..%s" % (oldrev, newrev)])
|
||||
|
||||
if '[schema]' in commits:
|
||||
print()
|
||||
|
|
|
@ -74,7 +74,6 @@ exclude_scripts_py2 = [] # type: List[str]
|
|||
|
||||
exclude_scripts_py3 = """
|
||||
bots/process_ccache
|
||||
tools/post-receive
|
||||
""".split()
|
||||
|
||||
parser = argparse.ArgumentParser(description="Run mypy on files tracked by git.")
|
||||
|
|
Loading…
Reference in New Issue