From 9f2a80ecde043c7548fe3bb6f693448c18ab4c8e Mon Sep 17 00:00:00 2001 From: totaam Date: Mon, 12 Apr 2021 22:48:17 +0700 Subject: [PATCH] log all the 'times', 'time' may not be defined if the installation is missing the headers --- xpra/server/http_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xpra/server/http_handler.py b/xpra/server/http_handler.py index e0a73c3c93..0d9bb16252 100644 --- a/xpra/server/http_handler.py +++ b/xpra/server/http_handler.py @@ -145,9 +145,9 @@ def get_headers(self): @classmethod def may_reload_headers(cls, http_headers_dirs): + mtimes = {} if cls.http_headers_cache: #do we need to refresh the cache? - mtimes = {} for d in http_headers_dirs: if os.path.exists(d) and os.path.isdir(d): mtime = os.path.getmtime(d) @@ -176,7 +176,7 @@ def may_reload_headers(cls, http_headers_dirs): continue headers[parts[0]] = parts[1] cls.http_headers_time[d] = mtime - log("may_reload_headers() headers=%s, mtime=%s", headers, mtime) + log("may_reload_headers() headers=%s, mtime=%s", headers, mtimes) cls.http_headers_cache = headers return headers