mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[yolo] Cosmetic improvement for logs during system package upgrades
This commit is contained in:
parent
a2563db0e6
commit
79627d79cc
1 changed files with 4 additions and 1 deletions
|
@ -640,8 +640,11 @@ def tools_upgrade(operation_logger, apps=None, system=False):
|
|||
|
||||
logger.debug("Running apt command :\n{}".format(dist_upgrade))
|
||||
|
||||
def is_relevant(l):
|
||||
return "Reading database ..." not in l.rstrip()
|
||||
|
||||
callbacks = (
|
||||
lambda l: logger.info("+" + l.rstrip() + "\r"),
|
||||
lambda l: logger.info("+ " + l.rstrip() + "\r") if is_relevant(l) else logger.debug(l.rstrip() + "\r"),
|
||||
lambda l: logger.warning(l.rstrip()),
|
||||
)
|
||||
returncode = call_async_output(dist_upgrade, callbacks, shell=True)
|
||||
|
|
Loading…
Add table
Reference in a new issue