From: Uwe Hermann Date: Fri, 26 Aug 2016 06:59:07 +0000 (+0200) Subject: usb_power_delivery: Drop problematic exception in us2samples(). X-Git-Tag: libsigrokdecode-0.5.0~149 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a1f66576f4b5e6d13edeb7319cae9c09679aafa4;p=libsigrokdecode.git usb_power_delivery: Drop problematic exception in us2samples(). This causes an issue when running the sigrok-test test-cases, so drop it for now (the same check already exists in decode()). This fixes bug #758. --- diff --git a/decoders/usb_power_delivery/pd.py b/decoders/usb_power_delivery/pd.py index c908e53..48db41b 100644 --- a/decoders/usb_power_delivery/pd.py +++ b/decoders/usb_power_delivery/pd.py @@ -471,8 +471,6 @@ class Decoder(srd.Decoder): ) def us2samples(self, us): - if not self.samplerate: - raise SamplerateError('Need the samplerate.') return int(us * self.samplerate / 1000000) def decode_packet(self):