From 4b380d0d3b8302592f79e7f4b83204bac4792197 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Mon, 15 Mar 2021 13:10:53 +0100 Subject: [PATCH] mgr/dashboard: Python2 Cookie module import fails on Python3 This fix only affects Nautilus because all successor versions are based on Python3 only. Fixes: https://tracker.ceph.com/issues/49802 Signed-off-by: Volker Theile --- src/pybind/mgr/dashboard/controllers/auth.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/controllers/auth.py b/src/pybind/mgr/dashboard/controllers/auth.py index 349b1c4ee72..51139bef883 100644 --- a/src/pybind/mgr/dashboard/controllers/auth.py +++ b/src/pybind/mgr/dashboard/controllers/auth.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -import Cookie +try: + import Cookie +except ImportError: + import http.cookies as Cookie import sys import jwt -- 2.47.3