]> granicus.if.org Git - python/commitdiff
The trace module was trying to turn ints into ints since co_lnotab was changed
authorBrett Cannon <bcannon@gmail.com>
Fri, 30 Jan 2009 01:31:34 +0000 (01:31 +0000)
committerBrett Cannon <bcannon@gmail.com>
Fri, 30 Jan 2009 01:31:34 +0000 (01:31 +0000)
to a bytes object.

Lib/trace.py
Misc/NEWS

index a5c2f1104becce7466068390a569b0e074e443be..a272683d957287df31ea072498e57c617650bbae 100644 (file)
@@ -367,7 +367,7 @@ def find_lines_from_code(code, strs):
     """Return dict where keys are lines in the line number table."""
     linenos = {}
 
-    line_increments = [ord(c) for c in code.co_lnotab[1::2]]
+    line_increments = code.co_lnotab[1::2]
     table_length = len(line_increments)
     docstring = False
 
index c2b4ed8be6fd76f2ce254cf37b64abb394bd06d8..95468b409558bc4fe95ddb66ca75f1145d78cee0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -147,6 +147,9 @@ Core and Builtins
 Library
 -------
 
+- Fix a bug in the trace module where a bytes object from co_lnotab had its
+  items being passed through ord().
+
 - Issue #2047: shutil.move() could believe that its destination path was
   inside its source path if it began with the same letters (e.g. "src" vs.
   "src.new").