diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-07-08 21:32:32 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-07-09 17:58:37 +0200 |
commit | 21cda9512f29947617da45822ab524b1f76f56c1 (patch) | |
tree | 1419531d60662eb87bacb9ce53e05374314c6ded /decoders/i2c/pd.py | |
parent | e28f7aee3b96afeb543e0c3c29e3950ddd61a490 (diff) | |
download | libsigrokdecode-21cda9512f29947617da45822ab524b1f76f56c1.tar.gz libsigrokdecode-21cda9512f29947617da45822ab524b1f76f56c1.zip |
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.
Diffstat (limited to 'decoders/i2c/pd.py')
-rw-r--r-- | decoders/i2c/pd.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/decoders/i2c/pd.py b/decoders/i2c/pd.py index ced58cd..b46fd1d 100644 --- a/decoders/i2c/pd.py +++ b/decoders/i2c/pd.py @@ -269,7 +269,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.') for (self.samplenum, pins) in data: # Ignore identical samples early on (for performance reasons). |