summaryrefslogtreecommitdiff
path: root/lab/show_pyc.py
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
commitec82227213ac419d294f9f5019e9b94e81a71972 (patch)
tree090ee6de4ac8efdeb072307a6042991c026396dc /lab/show_pyc.py
parentf7df6f04a5656f562105cf5001c11b9e10e04d2b (diff)
downloadpython-coveragepy-git-ec82227213ac419d294f9f5019e9b94e81a71972.tar.gz
Properly handle crazy-long code objects. #359
Diffstat (limited to 'lab/show_pyc.py')
-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 b2cbb342..d6bbd921 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)