mirror of https://github.com/zulip/zulip.git
scripts/: Make subprocess calls unicode-aware.
This commit is contained in:
parent
97d877f49e
commit
51ea5c1602
|
@ -43,7 +43,7 @@ try:
|
||||||
logging.info("Unpacking the tarball")
|
logging.info("Unpacking the tarball")
|
||||||
unpack_zulip = os.path.realpath(os.path.join(os.path.dirname(__file__), 'unpack-zulip'))
|
unpack_zulip = os.path.realpath(os.path.join(os.path.dirname(__file__), 'unpack-zulip'))
|
||||||
deploy_path = subprocess.check_output([unpack_zulip, archived_tarball_path],
|
deploy_path = subprocess.check_output([unpack_zulip, archived_tarball_path],
|
||||||
preexec_fn=su_to_zulip)
|
preexec_fn=su_to_zulip, universal_newlines=True)
|
||||||
|
|
||||||
# Chdir to deploy_path and then run upgrade-zulip-stage-2 from the
|
# Chdir to deploy_path and then run upgrade-zulip-stage-2 from the
|
||||||
# new version of Zulip (having the upgrade logic run from the new
|
# new version of Zulip (having the upgrade logic run from the new
|
||||||
|
|
|
@ -24,7 +24,7 @@ states = {
|
||||||
}
|
}
|
||||||
|
|
||||||
pattern = re.compile(r'(\w+)\t(\d+)')
|
pattern = re.compile(r'(\w+)\t(\d+)')
|
||||||
output = subprocess.check_output(['/usr/sbin/rabbitmqctl', 'list_queues'], shell=False)
|
output = subprocess.check_output(['/usr/sbin/rabbitmqctl', 'list_queues'], universal_newlines=True)
|
||||||
|
|
||||||
status = 0
|
status = 0
|
||||||
max_count = 0
|
max_count = 0
|
||||||
|
|
|
@ -38,7 +38,7 @@ logging.info("Starting workers")
|
||||||
subprocess.check_call(["supervisorctl", "start", "zulip-workers:*"])
|
subprocess.check_call(["supervisorctl", "start", "zulip-workers:*"])
|
||||||
|
|
||||||
using_sso = subprocess.check_output(['./scripts/get-django-setting', 'USING_APACHE_SSO'])
|
using_sso = subprocess.check_output(['./scripts/get-django-setting', 'USING_APACHE_SSO'])
|
||||||
if using_sso.strip() == 'True':
|
if using_sso.strip() == b'True':
|
||||||
logging.info("Restarting Apache WSGI process...")
|
logging.info("Restarting Apache WSGI process...")
|
||||||
subprocess.check_call(["pkill", "-f", "apache2", "-u", "zulip"])
|
subprocess.check_call(["pkill", "-f", "apache2", "-u", "zulip"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue