From 0eeeb544e1ea3cef9669f98e7c0b19b8f73a9236 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 21 Nov 2012 22:51:31 +0100 Subject: Fix bugs in "Invalid state" printing/exceptions. --- decoders/i2c/pd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoders/i2c') diff --git a/decoders/i2c/pd.py b/decoders/i2c/pd.py index 53321eb..40baf44 100644 --- a/decoders/i2c/pd.py +++ b/decoders/i2c/pd.py @@ -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 -- cgit v1.2.3-70-g09d2