From: Uwe Hermann Date: Mon, 20 Jul 2020 21:17:39 +0000 (+0200) Subject: spdif: Simplify samplerate check. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=cc75bd231ee4878c08fed6b352caaf340d84728e;p=libsigrokdecode.git spdif: Simplify samplerate check. --- 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.