Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r75425:f7b0089c0975
Date: 2015-01-18 14:52 +0100
http://bitbucket.org/pypy/pypy/changeset/f7b0089c0975/

Log:    Process truncated log files

diff --git a/pypy/stm/print_stm_log.py b/pypy/stm/print_stm_log.py
--- a/pypy/stm/print_stm_log.py
+++ b/pypy/stm/print_stm_log.py
@@ -72,7 +72,7 @@
         result = []
         while True:
             packet = f.read(19)
-            if not packet: break
+            if len(packet) < 19: break
             sec, nsec, threadnum, otherthreadnum, event, len1, len2 = \
                   struct.unpack("IIIIBBB", packet)
             if event >= _STM_EVENT_N:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to