From 60d6c748ef611b8a2f63aa3f428ee708783b4e04 Mon Sep 17 00:00:00 2001 From: Arksine Date: Sun, 23 May 2021 14:26:22 -0400 Subject: [PATCH] moonraker: rename deprecated "logging.warn" Python uses "logging.warning" to log warning level methods. Signed-off-by: Eric Callahan --- moonraker/components/update_manager.py | 2 +- moonraker/moonraker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moonraker/components/update_manager.py b/moonraker/components/update_manager.py index 44b5866..324c231 100644 --- a/moonraker/components/update_manager.py +++ b/moonraker/components/update_manager.py @@ -328,7 +328,7 @@ class CommandHelper: self.server = config.get_server() self.debug_enabled = config.getboolean('enable_repo_debug', False) if self.debug_enabled: - logging.warn("UPDATE MANAGER: REPO DEBUG ENABLED") + logging.warning("UPDATE MANAGER: REPO DEBUG ENABLED") shell_cmd: SCMDComp = self.server.lookup_component('shell_command') self.scmd_error = shell_cmd.error self.build_shell_command = shell_cmd.build_shell_command diff --git a/moonraker/moonraker.py b/moonraker/moonraker.py index 8cc6954..1c5aa64 100755 --- a/moonraker/moonraker.py +++ b/moonraker/moonraker.py @@ -161,7 +161,7 @@ class Server: def add_warning(self, warning: str, log: bool = True) -> None: self.warnings.append(warning) if log: - logging.warn(warning) + logging.warning(warning) # ***** Component Management ***** def _load_components(self, config: confighelper.ConfigHelper) -> None: