From cc75bd231ee4878c08fed6b352caaf340d84728e Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Mon, 20 Jul 2020 23:17:39 +0200 Subject: spdif: Simplify samplerate check. --- decoders/spdif/pd.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'decoders') 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. -- cgit v1.2.3-70-g09d2