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/gui/qt/terminal.py | 7 ++++--- portato/gui/qt/windows.py | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'portato/gui/qt') diff --git a/portato/gui/qt/terminal.py b/portato/gui/qt/terminal.py index 0c7cf8b..a70e56b 100644 --- a/portato/gui/qt/terminal.py +++ b/portato/gui/qt/terminal.py @@ -17,16 +17,17 @@ from threading import Thread, currentThread from os import read, close import errno +from portato.gui.wrapper import Console +from portato.helper import debug + try: from curses.ascii import ctrl except ImportError: # emulate ctrl-behavior for known values def ctrl (val): if val == "H": return '\x08' elif val == "W": return '\x17' - else: debug("unknown error passed to emulated ctrl:",val) + else: debug("unknown error passed to emulated ctrl: %s",val) -from portato.gui.wrapper import Console -from portato.helper import debug class WriteEvent (Qt.QEvent): TYPE = Qt.QEvent.Type(1001) diff --git a/portato/gui/qt/windows.py b/portato/gui/qt/windows.py index a61a6d7..2f40dcf 100644 --- a/portato/gui/qt/windows.py +++ b/portato/gui/qt/windows.py @@ -497,7 +497,7 @@ class PackageDetails: try: self.queue.append(self.actual_package().get_cpv(), unmerge = True) except PackageNotFoundException, e: - debug("Package could not be found",e[0], error = 1) + error("Package could not be found: %s", e[0]) def actual_package (self): @@ -971,9 +971,9 @@ class MainWindow (Window): flags.write_use_flags() if len(flags.new_masked)>0 or len(flags.new_unmasked)>0 or len(flags.newTesting)>0: - debug("new masked:",flags.new_masked) - debug("new unmasked:", flags.new_unmasked) - debug("new testing:", flags.newTesting) + debug("new masked: %s",flags.new_masked) + debug("new unmasked: %s", flags.new_unmasked) + debug("new testing: %s", flags.newTesting) changed_flags_dialog(self, "masking keywords") flags.write_masked() flags.write_testing() @@ -1001,7 +1001,7 @@ class MainWindow (Window): else: updating = system.update_world(newuse = self.cfg.get_boolean("newuse"), deep = self.cfg.get_boolean("deep")) - debug("updating list:", [(x.get_cpv(), y.get_cpv()) for x,y in updating],"--> length:",len(updating)) + debug("updating list: %s --> length: %s", [(x.get_cpv(), y.get_cpv()) for x,y in updating], len(updating)) try: try: for pkg, old_pkg in updating: -- cgit v1.2.3-54-g00ecf