summaryrefslogtreecommitdiff
path: root/lab
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-02-17 07:35:01 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-02-17 07:35:01 -0500
commit0155f1f0619640cce45dd2a3ace367e04c4eb0d2 (patch)
treeb99c17a1ec4001c25b249002d054d77c10ac90ca /lab
parent318033bec0bfde3f09304294a3c3fec70ae26057 (diff)
downloadpython-coveragepy-0155f1f0619640cce45dd2a3ace367e04c4eb0d2.tar.gz
Properly handle crazy-long code objects. #359
Diffstat (limited to 'lab')
-rw-r--r--lab/show_pyc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lab/show_pyc.py b/lab/show_pyc.py
index b2cbb34..d6bbd92 100644
--- a/lab/show_pyc.py
+++ b/lab/show_pyc.py
@@ -4,7 +4,7 @@ def show_pyc_file(fname):
f = open(fname, "rb")
magic = f.read(4)
moddate = f.read(4)
- modtime = time.asctime(time.localtime(struct.unpack('L', moddate)[0]))
+ modtime = time.asctime(time.localtime(struct.unpack('<L', moddate)[0]))
print "magic %s" % (magic.encode('hex'))
print "moddate %s (%s)" % (moddate.encode('hex'), modtime)
code = marshal.load(f)