From 3667dddd75032aaa15fe83e7424a9afaabc7ff78 Mon Sep 17 00:00:00 2001 From: Dmitry Romanov Date: Sat, 20 Apr 2024 23:03:13 -0400 Subject: [PATCH] Fix CCDB_USER environment variable work --- python/ccdb/__init__.py | 3 --- python/ccdb/cmd/cli_manager.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/python/ccdb/__init__.py b/python/ccdb/__init__.py index e0c7c5f..7a40f4f 100644 --- a/python/ccdb/__init__.py +++ b/python/ccdb/__init__.py @@ -137,9 +137,6 @@ def init_ccdb_console(): logger.debug("--errors-silent flag. Print errors and return non 0 code but don't raise python exceptions") context.exception_handling = CCDB_EXCEPTIONS_SILENT - - - # CONNECTION STRING # ------------------------------ diff --git a/python/ccdb/cmd/cli_manager.py b/python/ccdb/cmd/cli_manager.py index b268b0f..df5ddeb 100644 --- a/python/ccdb/cmd/cli_manager.py +++ b/python/ccdb/cmd/cli_manager.py @@ -95,6 +95,17 @@ def theme(self, value): log.debug(lfm(" |- theme(value) {0} | \\{0} | |- theme switched to : '{1}'", os.linesep, value)) self.context.theme = value + @property + def user_name(self): + """":rtype: str""" + return self.context.user_name + + @user_name.setter + def user_name(self, value): + self.context.user_name = value + + + # ===================================================================================== # ------------------ C O M M A N D S M A N A G E M E N T --------------------------- # =====================================================================================