]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2c/pd.py
pan1321: Properly check for \r\n, not just \n.
[libsigrokdecode.git] / decoders / i2c / pd.py
index 53321eb02c401525e78fc3bd59774117a1078589..0b85c668a88390901f9294b3d5d5ef27fc2b3404 100644 (file)
@@ -1,5 +1,5 @@
 ##
-## This file is part of the sigrok project.
+## This file is part of the libsigrokdecode project.
 ##
 ## Copyright (C) 2010-2011 Uwe Hermann <uwe@hermann-uwe.de>
 ##
@@ -232,7 +232,7 @@ class Decoder(srd.Decoder):
                 if self.is_data_bit(scl, sda):
                     self.get_ack(scl, sda)
             else:
-                raise Exception('Invalid state %d' % self.STATE)
+                raise Exception('Invalid state: %s' % self.state)
 
             # Save current SDA/SCL values for the next round.
             self.oldscl = scl