diff options
author | Devan Franchini <twitch153@gentoo.org> | 2014-04-26 15:29:23 -0400 |
---|---|---|
committer | Devan Franchini <twitch153@gentoo.org> | 2015-06-19 15:44:08 -0400 |
commit | 2909c15aff1eb419a7d705067864ac6b90ecf097 (patch) | |
tree | 49a0385518a880e5d518f349d7e8d6bbfa890518 /WebappConfig/debug.py | |
parent | sbin/webapp-cleaner: alters source to /lib/gentoo/functions.sh (diff) | |
download | webapp-config-2909c15aff1eb419a7d705067864ac6b90ecf097.tar.gz webapp-config-2909c15aff1eb419a7d705067864ac6b90ecf097.tar.bz2 webapp-config-2909c15aff1eb419a7d705067864ac6b90ecf097.zip |
Adds python3.x compatibility to codebase.
Although most of the codebase already has python3.x compatibility
when running 2to3 more minor changes where found. This commit
includes the changes found when running 2to3 on webapp-config's
codebase.
Diffstat (limited to 'WebappConfig/debug.py')
-rw-r--r-- | WebappConfig/debug.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WebappConfig/debug.py b/WebappConfig/debug.py index 5482f43..1e6bd2c 100644 --- a/WebappConfig/debug.py +++ b/WebappConfig/debug.py @@ -395,7 +395,7 @@ class Message: callerlocals = inspect.getargvalues(caller[0])[3] ## Is the caller an obejct? If so he provides 'self' - if 'self' in callerlocals.keys(): + if 'self' in list(callerlocals.keys()): callerobject = callerlocals['self'] del callerlocals['self'] if self.show_class_variables: @@ -407,7 +407,7 @@ class Message: # Remove variables not requested if not '*' in self.debug_var: - callerlocals = dict([i for i in callerlocals.items() + callerlocals = dict([i for i in list(callerlocals.items()) if i[0] in self.debug_var]) ## Is the object among the list of objects to debug? @@ -445,7 +445,7 @@ class Message: print('// ' + c, file=self.debug_out) # Selected variables follow if callerlocals: - for i,j in callerlocals.items(): + for i,j in list(callerlocals.items()): print('// ' \ + self.maybe_color('turquoise', str(i)) + ':' + str(j), file=self.debug_out) # Finally the message @@ -480,7 +480,7 @@ class Message: if self.debug_vrb == 3: print(ls + '//', file=self.debug_out) print(ls + '// VALUES ', file=self.debug_out) - for i,j in callerlocals.items(): + for i,j in list(callerlocals.items()): print(ls + '// ------------------> ' \ + self.maybe_color('turquoise', str(i)) + ':', file=self.debug_out) breaklines(str(j)) |