]> granicus.if.org Git - python/commitdiff
Another nit found by Neal Norwitz using pychecker. This was caused by a
authorSkip Montanaro <skip@pobox.com>
Mon, 7 Jun 2004 11:20:40 +0000 (11:20 +0000)
committerSkip Montanaro <skip@pobox.com>
Mon, 7 Jun 2004 11:20:40 +0000 (11:20 +0000)
too-mechanical translation when converting html() to text() (simply stripped
strong() where it appeared).

Lib/cgitb.py

index 33541fb8fc5909d134eebfa0e641f61575b307c6..f75a84ce94ceba883e867ec35a19616abdc03f9b 100644 (file)
@@ -211,8 +211,7 @@ function calls leading up to the error, in the order they occurred.
             done[name] = 1
             if value is not __UNDEF__:
                 if where == 'global': name = 'global ' + name
-                elif where == 'local': name = name
-                else: name = where + name.split('.')[-1]
+                elif where != 'local': name = where + name.split('.')[-1]
                 dump.append('%s = %s' % (name, pydoc.text.repr(value)))
             else:
                 dump.append(name + ' undefined')