summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2020-07-20 23:17:39 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2020-07-20 23:19:03 +0200
commitcc75bd231ee4878c08fed6b352caaf340d84728e (patch)
treefa77f73bcd602e508560ee33a149f6c3325f34ea /decoders
parent51194ffccbd674d9b226d47858f80750a8b6d8ef (diff)
downloadlibsigrokdecode-cc75bd231ee4878c08fed6b352caaf340d84728e.tar.gz
libsigrokdecode-cc75bd231ee4878c08fed6b352caaf340d84728e.zip
spdif: Simplify samplerate check.
Diffstat (limited to 'decoders')
-rw-r--r--decoders/spdif/pd.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/decoders/spdif/pd.py b/decoders/spdif/pd.py
index 65d1903..1b7f6e9 100644
--- a/decoders/spdif/pd.py
+++ b/decoders/spdif/pd.py
@@ -266,10 +266,7 @@ class Decoder(srd.Decoder):
def decode(self):
# Set samplerate to 0 if it is not given. Decoding is still possible.
- try:
- if self.samplerate != 0:
- pass
- except:
+ if not self.samplerate:
self.samplerate = 0
# Throw away first two edges as it might be mangled data.