diff --git a/tools/post-receive b/tools/post-receive index 00ff8db6af..4b754c2717 100755 --- a/tools/post-receive +++ b/tools/post-receive @@ -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() diff --git a/tools/run-mypy b/tools/run-mypy index 31c26a1b49..795d3ac1e9 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -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.")