From 561f5f4230627ef79fbafa286c64ff030e2f2410 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Thu, 24 Mar 2022 18:09:18 -0400 Subject: [PATCH] http client: minor logging fix Signed-off-by: Eric Callahan --- moonraker/components/http_client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/moonraker/components/http_client.py b/moonraker/components/http_client.py index bb3f254..b3881ec 100644 --- a/moonraker/components/http_client.py +++ b/moonraker/components/http_client.py @@ -147,9 +147,10 @@ class HttpClient: if resp.code == 304: err = None if cached is None: - logging.info( - "Request returned 304, however no cached " - "item was found") + if enable_cache: + logging.info( + "Request returned 304, however no cached " + "item was found") result = b"" else: logging.debug(f"Request returned from cache: {url}")