summaryrefslogtreecommitdiff
path: root/scripts/utilsDebug.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /scripts/utilsDebug.py
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
Notes
Diffstat (limited to 'scripts/utilsDebug.py')
-rw-r--r--scripts/utilsDebug.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/scripts/utilsDebug.py b/scripts/utilsDebug.py
index 4b5eb7fa3e706..80038912b8d08 100644
--- a/scripts/utilsDebug.py
+++ b/scripts/utilsDebug.py
@@ -28,9 +28,11 @@ import sys
# Authors: Illya Rudkin 28/11/2013.
# Changes: None.
#--
+
+
class CDebugFnVerbose(object):
# Public static properties:
- bVerboseOn = False # True = turn on function tracing, False = turn off.
+ bVerboseOn = False # True = turn on function tracing, False = turn off.
# Public:
#++------------------------------------------------------------------------
@@ -51,10 +53,13 @@ class CDebugFnVerbose(object):
# Throws: None.
#--
def dump_object(self, vstrText, vObject):
- if CDebugFnVerbose.bVerboseOn == False:
+ if not CDebugFnVerbose.bVerboseOn:
return
- sys.stdout.write("%d%s> Dp: %s" % (CDebugFnVerbose.__nLevel, self.__get_dots(),
- vstrText))
+ sys.stdout.write(
+ "%d%s> Dp: %s" %
+ (CDebugFnVerbose.__nLevel,
+ self.__get_dots(),
+ vstrText))
print(vObject)
#++------------------------------------------------------------------------
@@ -65,7 +70,7 @@ class CDebugFnVerbose(object):
# Throws: None.
#--
def dump_text(self, vstrText):
- if CDebugFnVerbose.bVerboseOn == False:
+ if not CDebugFnVerbose.bVerboseOn:
return
print(("%d%s> Dp: %s" % (CDebugFnVerbose.__nLevel, self.__get_dots(),
vstrText)))
@@ -94,8 +99,8 @@ class CDebugFnVerbose(object):
#--
def __indent_back(self):
if CDebugFnVerbose.bVerboseOn:
- print(("%d%s< fn: %s" % (CDebugFnVerbose.__nLevel, self.__get_dots(),
- self.__strFnName)))
+ print(("%d%s< fn: %s" % (CDebugFnVerbose.__nLevel,
+ self.__get_dots(), self.__strFnName)))
CDebugFnVerbose.__nLevel -= 1
#++------------------------------------------------------------------------
@@ -110,11 +115,11 @@ class CDebugFnVerbose(object):
CDebugFnVerbose.__nLevel += 1
self.__strFnName = vstrFnName
if CDebugFnVerbose.bVerboseOn:
- print(("%d%s> fn: %s" % (CDebugFnVerbose.__nLevel, self.__get_dots(),
- self.__strFnName)))
+ print(("%d%s> fn: %s" % (CDebugFnVerbose.__nLevel,
+ self.__get_dots(), self.__strFnName)))
# Private statics attributes:
- __nLevel = 0 # Indentation level counter
+ __nLevel = 0 # Indentation level counter
# Private attributes:
__strFnName = ""