From 7984d02bf0b36c534d9f3e0dcf9fd326391fe4b2 Mon Sep 17 00:00:00 2001 From: Dan Farnsworth Date: Tue, 2 Aug 2022 13:11:03 -0600 Subject: [PATCH] Fix AttributeError thrown due to python2 compatibility changes --- devlab_bench/actions/global_restart.py | 2 +- devlab_bench/helpers/common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devlab_bench/actions/global_restart.py b/devlab_bench/actions/global_restart.py index a41af5d..323f49f 100644 --- a/devlab_bench/actions/global_restart.py +++ b/devlab_bench/actions/global_restart.py @@ -18,7 +18,7 @@ def action(**kwargs): ) containers = global_devlab_docker.get_containers()[1] project_map = {} - log.info("containers='%s'", containers) + log.info("Devlab related containers to restart: '%s'", containers) for cont in containers: cont_name = cont['name'] comp_name = cont_name diff --git a/devlab_bench/helpers/common.py b/devlab_bench/helpers/common.py index dd610e6..458547a 100644 --- a/devlab_bench/helpers/common.py +++ b/devlab_bench/helpers/common.py @@ -34,7 +34,7 @@ def home(self=None): #pylint: disable=bad-staticmethod-argument,unused-argument Return the expanded path to the user's home """ return os.path.expanduser('~') -except NameError: +except AttributeError: #Python3 text_input = input #pylint: disable=invalid-name quote = shlex.quote #pylint: disable=invalid-name