mirror of https://github.com/zulip/zulip.git
logging: Pass more format arguments to logging.
Commit bdc365d0fe
(#14852) missed this
because of https://github.com/returntocorp/semgrep/issues/831.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
824d97987b
commit
333f7d16c9
|
@ -25,8 +25,8 @@ def run(args: List[str], dry_run: bool = False) -> str:
|
|||
stderr=subprocess.PIPE)
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode:
|
||||
logger.error("Could not invoke %s\nstdout: %r\nstderror: %r"
|
||||
% (args[0], stdout, stderr))
|
||||
logger.error("Could not invoke %s\nstdout: %r\nstderror: %r",
|
||||
args[0], stdout, stderr)
|
||||
sys.exit(1)
|
||||
return stdout.decode()
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ try:
|
|||
# the Zulip user, and then unpack it from that directory, so that
|
||||
# we can unpack using the Zulip user even if the original path was
|
||||
# not readable by the Zulip user.
|
||||
logging.info("Archiving the tarball under %s" % (TARBALL_ARCHIVE_PATH,))
|
||||
logging.info("Archiving the tarball under %s", TARBALL_ARCHIVE_PATH)
|
||||
os.makedirs(TARBALL_ARCHIVE_PATH, exist_ok=True)
|
||||
archived_tarball_path = os.path.join(TARBALL_ARCHIVE_PATH, os.path.basename(tarball_path))
|
||||
shutil.copy(tarball_path, archived_tarball_path)
|
||||
|
|
|
@ -43,7 +43,7 @@ os_version = distro_info['VERSION_ID']
|
|||
|
||||
if (vendor, os_version) in UNSUPPORTED_DISTROS:
|
||||
# Link to documentation for how to correctly upgrade the OS.
|
||||
logging.critical("Unsupported platform: {} {}".format(vendor, os_version))
|
||||
logging.critical("Unsupported platform: %s %s", vendor, os_version)
|
||||
logging.info("Sorry! The support for your OS has been discontinued.\n"
|
||||
"Please upgrade your OS to a supported release first.\n"
|
||||
"See https://zulip.readthedocs.io/en/latest/production/"
|
||||
|
|
|
@ -65,7 +65,7 @@ if tornado_processes > 1:
|
|||
# restarts. This also avoids behavior with restarting a whole
|
||||
# supervisord group where if any individual process is slow to
|
||||
# stop, the whole bundle stays stopped for an extended time.
|
||||
logging.info("Restarting Tornado process on port %s" % (p,))
|
||||
logging.info("Restarting Tornado process on port %s", p)
|
||||
subprocess.check_call(["supervisorctl", "restart", "zulip-tornado:port-%s" % (p,)])
|
||||
else:
|
||||
logging.info("Restarting Tornado process")
|
||||
|
|
Loading…
Reference in New Issue