diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-17 07:35:01 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-17 07:35:01 -0500 |
commit | ec82227213ac419d294f9f5019e9b94e81a71972 (patch) | |
tree | 090ee6de4ac8efdeb072307a6042991c026396dc /lab/show_pyc.py | |
parent | f7df6f04a5656f562105cf5001c11b9e10e04d2b (diff) | |
download | python-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.py | 2 |
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) |