]> sigrok.org Git - libsigrokdecode.git/commitdiff
spdif: Simplify samplerate check.
authorUwe Hermann <redacted>
Mon, 20 Jul 2020 21:17:39 +0000 (23:17 +0200)
committerUwe Hermann <redacted>
Mon, 20 Jul 2020 21:19:03 +0000 (23:19 +0200)
decoders/spdif/pd.py

index 65d1903c1f6197ecf5ee20e93cf3176214dda594..1b7f6e92a7cf196f3e1e5edc4953d8c32d997f4c 100644 (file)
@@ -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.