From fc6d232a9357211a44dad3300ff64571620aa1bf Mon Sep 17 00:00:00 2001 From: necoro <> Date: Fri, 13 Jul 2007 04:09:51 +0000 Subject: new fancier log output --- portato/plugins/etc_proposals.py | 10 +++++----- portato/plugins/resume_loop.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'portato/plugins') diff --git a/portato/plugins/etc_proposals.py b/portato/plugins/etc_proposals.py index fa54600..e6c3187 100644 --- a/portato/plugins/etc_proposals.py +++ b/portato/plugins/etc_proposals.py @@ -10,7 +10,7 @@ # # Written by René 'Necoro' Neumann -from portato.helper import debug, am_i_root +from portato.helper import * from portato.backend import system from subprocess import Popen @@ -50,7 +50,7 @@ def etc_prop (*args, **kwargs): if float(__version__) < 1.1: l = len(PortatoEtcProposals()) - debug(l,"files to update") + debug("%s files to update.", l) if l > 0: Popen(PROG) @@ -60,7 +60,7 @@ def etc_prop (*args, **kwargs): if f: Popen([PROG, "--fastexit"]+f) else: - debug("Cannot start etc-proposals. No graphical frontend installed!", error = 1) + error("Cannot start etc-proposals. No graphical frontend installed!") def etc_prop_menu (*args, **kwargs): if am_i_root(): @@ -72,6 +72,6 @@ def etc_prop_menu (*args, **kwargs): if f: Popen([PROG]+f) else: - debug("Cannot start etc-proposals. No graphical frontend installed!", error = 1) + error("Cannot start etc-proposals. No graphical frontend installed!") else: - debug("Cannot start etc-proposals. Not root!", error = 1) + error("Cannot start etc-proposals. Not root!") diff --git a/portato/plugins/resume_loop.py b/portato/plugins/resume_loop.py index 9891fee..45c735a 100644 --- a/portato/plugins/resume_loop.py +++ b/portato/plugins/resume_loop.py @@ -13,7 +13,7 @@ import pty from subprocess import call, STDOUT from portato.backend import system -from portato.helper import debug +from portato.helper import debug, warning console = None command = "until emerge --resume --skipfirst; do : ; done" @@ -24,11 +24,11 @@ def set_console (*args, **kwargs): def resume_loop (retcode, *args, **kwargs): if retcode is None: - debug("Resume-loop called while process is still running!", warn = True) + warning("Resume-loop called while process is still running!") elif retcode == 0: # everything ok - ignore #pass - debug("Everything is ok") + debug("Everything is ok.") else: if console is None: debug("No console for the resume loop...") -- cgit v1.2.3