From 21cda9512f29947617da45822ab524b1f76f56c1 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 8 Jul 2014 21:32:32 +0200 Subject: Various PDs: Throw SamplerateError instead of Exception. Also, use the "if not self.samplerate" form, which catches both the case where self.samplerate is None, as well as the case where it is 0. --- decoders/spi/pd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoders/spi') diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py index 5c7df19..96c0689 100644 --- a/decoders/spi/pd.py +++ b/decoders/spi/pd.py @@ -265,7 +265,7 @@ class Decoder(srd.Decoder): def decode(self, ss, es, data): if not self.samplerate: - raise SamplerateError("Cannot decode without samplerate.") + raise SamplerateError('Cannot decode without samplerate.') # Either MISO or MOSI can be omitted (but not both). CS# is optional. for (self.samplenum, pins) in data: -- cgit v1.2.3-70-g09d2