[Pcsclite-cvs-commit] r6581 - /trunk/PCSC/src/spy/pcsc-spy
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Mar 29 16:44:48 UTC 2013
Author: rousseau
Date: Fri Mar 29 16:44:47 2013
New Revision: 6581
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6581
Log:
Check the first line format
This could happen if the trace file first lines are removed.
Modified:
trunk/PCSC/src/spy/pcsc-spy
Modified: trunk/PCSC/src/spy/pcsc-spy
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/pcsc-spy?rev=6581&op=diff
==============================================================================
--- trunk/PCSC/src/spy/pcsc-spy (original)
+++ trunk/PCSC/src/spy/pcsc-spy Fri Mar 29 16:44:47 2013
@@ -829,7 +829,15 @@
line = self.filedesc2.readline().strip()
(thread, tail) = line.split('@')
- (direction, sec, usec, fct) = tail.strip().split('|')
+ res = tail.strip().split('|')
+ # check the first line format
+ if res[0] != ">":
+ print "Wrong format!"
+ print "First line Should start with a '>' but got:"
+ print tail
+ return
+ (direction, sec, usec, fct) = res
+
start_time = int(sec) + int(usec) / 1000000.
while line != '':
More information about the Pcsclite-cvs-commit
mailing list