From 87efd8aa18bc1d94d6018c42d61e61a480d40d98 Mon Sep 17 00:00:00 2001 From: Maciej Borzecki Date: Tue, 6 Feb 2024 14:56:27 +0100 Subject: [PATCH] console_conf: use snap helper for obtaining project name Signed-off-by: Maciej Borzecki --- console_conf/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/console_conf/core.py b/console_conf/core.py index c9b4585b..257c5e1f 100644 --- a/console_conf/core.py +++ b/console_conf/core.py @@ -14,11 +14,11 @@ # along with this program. If not, see . import logging -import os from console_conf.models.console_conf import ConsoleConfModel from console_conf.models.systems import RecoverySystemsModel from subiquitycore.prober import Prober +from subiquitycore.snap import snap_name from subiquitycore.tui import TuiApplication log = logging.getLogger("console_conf.core") @@ -27,7 +27,7 @@ log = logging.getLogger("console_conf.core") # ends up as /run/console-conf. Note this should only be changed in # coordination with console-conf-wrapper and any other glue shipped with Ubuntu # Core boot base -CONSOLE_CONF_PROJECT = os.getenv("SNAP_INSTANCE_NAME", "console-conf") +CONSOLE_CONF_PROJECT = snap_name() or "console-conf" class ConsoleConf(TuiApplication):