From f04964c696336f5699a099bbd64785f199d91f4c Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 10 Aug 2014 09:22:29 +0200 Subject: spi/nrf24l01/uart: Use ChannelError exception. Rename the old MissingDataError to the clearer ChannelError. Also, add ChannelError in the UART decoder. --- decoders/spi/pd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'decoders/spi/pd.py') diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py index 374d22b..97d5571 100644 --- a/decoders/spi/pd.py +++ b/decoders/spi/pd.py @@ -63,7 +63,7 @@ spi_mode = { class SamplerateError(Exception): pass -class MissingDataError(Exception): +class ChannelError(Exception): pass class Decoder(srd.Decoder): @@ -279,6 +279,6 @@ class Decoder(srd.Decoder): # Either MISO or MOSI (but not both) can be omitted. if not (self.have_miso or self.have_mosi): - raise MissingDataError('Either MISO or MOSI (or both) pins required.') + raise ChannelError('Either MISO or MOSI (or both) pins required.') self.find_clk_edge(miso, mosi, clk, cs) -- cgit v1.2.3-70-g09d2