修改longyans

This commit is contained in:
wangsong 2021-12-14 21:01:07 +08:00
parent 0babb1b6cd
commit 04eed649fe
2 changed files with 17 additions and 15 deletions

View File

@ -19,21 +19,23 @@ UPDATER_DBUS_SERVICE = 'com.kylin.systemupgrade'
#颜色设置
COLORLOG_SUFFIX = "\033[0m"
# RED_PRE = "\033[31;1m"
# GREEN_PRE = "\033[32;1m"
# YELLOW_PRE = "\033[33;1m"
# BULE_PRE = "\033[34;1m"
# RED_PRE = "\033[35;1m"
# BACK_BLACK_PER = "\033[40;1m"
# BACK_RED_PER = "\033[41;1m"
# BACK_GREEN_PER = "\033[42;1m"
BACK_YELLOW_PER = "\033[43;1m"
# BACK_BLUE_PER = "\033[44;1m"
# GREEN_GREENBACK_PRE = "\033[1;32;42m"
BULE_GREENBACK_PRE = "\033[1;34;42m"
# Define some foreground colors
BLACK = 30
RED = 31
GREEN = 32
YELLOW = 33
BLUE = 34
MAGENTA = 35
CYAN = 36
WHITE = 37
COLORLOG_PREFIX = BACK_YELLOW_PER
COLORMETHOR_PREFIX = BULE_GREENBACK_PRE
#字体颜色
FRONT_COLOR_SEQ = "\033[1;%dm"
#背景颜色
BACK_COLOR_SEQ = "\033[%d;1m"
COLORLOG_PREFIX = FRONT_COLOR_SEQ % GREEN
COLORMETHOR_PREFIX = FRONT_COLOR_SEQ % CYAN
#dbus 建立
class UpdateManagerDbusController(dbus.service.Object):

View File

@ -342,7 +342,7 @@ class InstallBackendAptdaemon(InstallBackend):
if self.action == self.ACTION_REMOVE_PACKAGES or self.action == self.ACTION_UPDATE:
return
logging.info("\033[43;1m" + "emit" + "\033[0m" +" Cancelable: %r",Cancelable)
logging.info("\033[43;1m" + "Emitting" + "\033[0m" +" Cancelable: %r",Cancelable)
self.window_main.dbusController.Cancelable(Cancelable)
#增加取消信号的频发机制
self.trans_cancelable = Cancelable