From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Pomi9-0006Mp-Dm for garchives@archives.gentoo.org; Mon, 14 Feb 2011 00:54:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D976DE09D7; Mon, 14 Feb 2011 00:54:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9716EE09CE for ; Mon, 14 Feb 2011 00:54:14 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CB47E1B40D9 for ; Mon, 14 Feb 2011 00:54:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 2CA548006A for ; Mon, 14 Feb 2011 00:54:13 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: Subject: [gentoo-commits] proj/layman:overlord_merge commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/debug.py X-VCS-Directories: layman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: d308b929d9fb4a0c69d331079f9a8b3ebbb2164a Date: Mon, 14 Feb 2011 00:54:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: ffea55dad0694351eae8ba59038d5f02 commit: d308b929d9fb4a0c69d331079f9a8b3ebbb2164a Author: Brian Dolbec gmail com> AuthorDate: Mon Feb 14 00:50:45 2011 +0000 Commit: Brian Dolbec gmail com> CommitDate: Mon Feb 14 00:50:45 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/layman.git;a=3D= commit;h=3Dd308b929 more DebugMessage class cleanup/transition to subclassing Message --- layman/debug.py | 39 ++++++++++++++------------------------- 1 files changed, 14 insertions(+), 25 deletions(-) diff --git a/layman/debug.py b/layman/debug.py index d7af5aa..f5c247b 100644 --- a/layman/debug.py +++ b/layman/debug.py @@ -23,13 +23,10 @@ from layman.constants import (codes, DEBUG_LEVEL, = DEBUG_VERBOSITY, =20 from output import Message =20 -########################################################################= ######### -## -## Message Class -## -########################################################################= ######### =20 class DebugMessage(Message): + """fully Debug enabled subclass of output.py's Message + """ #FIXME: Think about some simple doctests before you modify this clas= s the # next time. =20 @@ -37,8 +34,8 @@ class DebugMessage(Message): out =3D sys.stdout, err =3D sys.stderr, dbg =3D sys.stderr, - debugging_level =3D DEBUG_LEVEL, - debugging_verbosity =3D DEBUG_VERBOSITY, + debug_level =3D DEBUG_LEVEL, + debug_verbosity =3D DEBUG_VERBOSITY, info_level =3D INFO_LEVEL, warn_level =3D WARN_LEVEL, col =3D True, @@ -50,6 +47,8 @@ class DebugMessage(Message): if obj =3D=3D None: obj =3D ['*'] if var =3D=3D None: var =3D ['*'] =20 + Message.__init__(self) + # A description of the module that is being debugged self.debug_env =3D module =20 @@ -57,24 +56,24 @@ class DebugMessage(Message): self.debug_out =3D dbg =20 # Where should the error output go? This can also be a file - self.error_out =3D err + #self.error_out =3D err =20 # Where should the normal output go? This can also be a file - self.std_out =3D out + #self.std_out =3D out =20 # The higher the level the more information you will get - self.warn_lev =3D warn_level + #self.warn_lev =3D warn_level =20 # The higher the level the more information you will get - self.info_lev =3D info_level + #self.info_lev =3D info_level =20 # The highest level of debugging messages acceptable for output # The higher the level the more output you will get - self.debug_lev =3D debugging_level + #self.debug_lev =3D debugging_level =20 # The debugging output can range from very verbose (3) to # very compressed (1) - self.debug_vrb =3D debugging_verbosity + self.debug_vrb =3D debug_verbosity =20 # Which methods should actually be debugged? # Use '*' to indicate 'All methods' @@ -92,17 +91,9 @@ class DebugMessage(Message): self.show_class_variables =3D False =20 # Should the output be colored? - self.use_color =3D col - - self.has_error =3D False + #self.use_color =3D col =20 - Message.__init__(self, - out =3D self.std_out, - err =3D self.error_out, - info_level =3D self.info_level, - warn_level =3D self.warn_level, - col =3D self.col - ) + #self.has_error =3D False =20 =20 ####################################################################= ######## @@ -252,8 +243,6 @@ class DebugMessage(Message): if variables: self.debug_var =3D variables =20 - def set_debug_level(self, debugging_level =3D DEBUG_LEVEL): - self.debug_lev =3D debugging_level =20 def set_debug_verbosity(self, debugging_verbosity =3D DEBUG_VERBOSIT= Y): self.debug_vrb =3D debugging_verbosity From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PorWZ-0004v8-N6 for garchives@archives.gentoo.org; Mon, 14 Feb 2011 06:03:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5BBF3E09CF; Mon, 14 Feb 2011 06:00:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1978CE09CF for ; Mon, 14 Feb 2011 06:00:34 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9462E1B423B for ; Mon, 14 Feb 2011 06:00:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0AE2E80073 for ; Mon, 14 Feb 2011 06:00:34 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: Subject: [gentoo-commits] proj/layman:master commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/debug.py X-VCS-Directories: layman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: d308b929d9fb4a0c69d331079f9a8b3ebbb2164a Date: Mon, 14 Feb 2011 06:00:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 3100923c547d93c0ce261fe8ca66966a Message-ID: <20110214060034.GWHd6J-SW5lFDDqTDbfRJrgpGlUAL5fDEInMPcJ__bo@z> commit: d308b929d9fb4a0c69d331079f9a8b3ebbb2164a Author: Brian Dolbec gmail com> AuthorDate: Mon Feb 14 00:50:45 2011 +0000 Commit: Brian Dolbec gmail com> CommitDate: Mon Feb 14 00:50:45 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/layman.git;a=3D= commit;h=3Dd308b929 more DebugMessage class cleanup/transition to subclassing Message --- layman/debug.py | 39 ++++++++++++++------------------------- 1 files changed, 14 insertions(+), 25 deletions(-) diff --git a/layman/debug.py b/layman/debug.py index d7af5aa..f5c247b 100644 --- a/layman/debug.py +++ b/layman/debug.py @@ -23,13 +23,10 @@ from layman.constants import (codes, DEBUG_LEVEL, = DEBUG_VERBOSITY, =20 from output import Message =20 -########################################################################= ######### -## -## Message Class -## -########################################################################= ######### =20 class DebugMessage(Message): + """fully Debug enabled subclass of output.py's Message + """ #FIXME: Think about some simple doctests before you modify this clas= s the # next time. =20 @@ -37,8 +34,8 @@ class DebugMessage(Message): out =3D sys.stdout, err =3D sys.stderr, dbg =3D sys.stderr, - debugging_level =3D DEBUG_LEVEL, - debugging_verbosity =3D DEBUG_VERBOSITY, + debug_level =3D DEBUG_LEVEL, + debug_verbosity =3D DEBUG_VERBOSITY, info_level =3D INFO_LEVEL, warn_level =3D WARN_LEVEL, col =3D True, @@ -50,6 +47,8 @@ class DebugMessage(Message): if obj =3D=3D None: obj =3D ['*'] if var =3D=3D None: var =3D ['*'] =20 + Message.__init__(self) + # A description of the module that is being debugged self.debug_env =3D module =20 @@ -57,24 +56,24 @@ class DebugMessage(Message): self.debug_out =3D dbg =20 # Where should the error output go? This can also be a file - self.error_out =3D err + #self.error_out =3D err =20 # Where should the normal output go? This can also be a file - self.std_out =3D out + #self.std_out =3D out =20 # The higher the level the more information you will get - self.warn_lev =3D warn_level + #self.warn_lev =3D warn_level =20 # The higher the level the more information you will get - self.info_lev =3D info_level + #self.info_lev =3D info_level =20 # The highest level of debugging messages acceptable for output # The higher the level the more output you will get - self.debug_lev =3D debugging_level + #self.debug_lev =3D debugging_level =20 # The debugging output can range from very verbose (3) to # very compressed (1) - self.debug_vrb =3D debugging_verbosity + self.debug_vrb =3D debug_verbosity =20 # Which methods should actually be debugged? # Use '*' to indicate 'All methods' @@ -92,17 +91,9 @@ class DebugMessage(Message): self.show_class_variables =3D False =20 # Should the output be colored? - self.use_color =3D col - - self.has_error =3D False + #self.use_color =3D col =20 - Message.__init__(self, - out =3D self.std_out, - err =3D self.error_out, - info_level =3D self.info_level, - warn_level =3D self.warn_level, - col =3D self.col - ) + #self.has_error =3D False =20 =20 ####################################################################= ######## @@ -252,8 +243,6 @@ class DebugMessage(Message): if variables: self.debug_var =3D variables =20 - def set_debug_level(self, debugging_level =3D DEBUG_LEVEL): - self.debug_lev =3D debugging_level =20 def set_debug_verbosity(self, debugging_verbosity =3D DEBUG_VERBOSIT= Y): self.debug_vrb =3D debugging_verbosity