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 | 0155f1f0619640cce45dd2a3ace367e04c4eb0d2 (patch) | |
tree | b99c17a1ec4001c25b249002d054d77c10ac90ca /lab | |
parent | 318033bec0bfde3f09304294a3c3fec70ae26057 (diff) | |
download | python-coveragepy-0155f1f0619640cce45dd2a3ace367e04c4eb0d2.tar.gz |
Properly handle crazy-long code objects. #359
Diffstat (limited to 'lab')
-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 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) |