diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2019-11-29 22:02:51 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2019-11-29 23:19:54 +0100 |
commit | 81bb8e847746ebe3a30cd796ad7ff1b514aae9c2 (patch) | |
tree | cb8f5e6faca41a3d9f3d4bdf34141f0e3bbf7590 /decoders/uart/pd.py | |
parent | 5ef0a979ca0553d43077390ea54837d3161c0ad5 (diff) | |
download | libsigrokdecode-81bb8e847746ebe3a30cd796ad7ff1b514aae9c2.tar.gz libsigrokdecode-81bb8e847746ebe3a30cd796ad7ff1b514aae9c2.zip |
uart: rephrase check for required input signals, reword error message
Rephrase the test for the availability of at least one of several
optional input signals, and reword the corresponding error message.
Diffstat (limited to 'decoders/uart/pd.py')
-rw-r--r-- | decoders/uart/pd.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoders/uart/pd.py b/decoders/uart/pd.py index 7a43ee4..effa3c5 100644 --- a/decoders/uart/pd.py +++ b/decoders/uart/pd.py @@ -504,8 +504,8 @@ class Decoder(srd.Decoder): raise SamplerateError('Cannot decode without samplerate.') has_pin = [self.has_channel(ch) for ch in (RX, TX)] - if has_pin == [False, False]: - raise ChannelError('Either TX or RX (or both) pins required.') + if not True in has_pin: + raise ChannelError('Need at least one of TX or RX pins.') opt = self.options inv = [opt['invert_rx'] == 'yes', opt['invert_tx'] == 'yes'] |