summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2016-08-26 08:59:07 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2016-08-26 15:03:45 +0200
commita1f66576f4b5e6d13edeb7319cae9c09679aafa4 (patch)
tree414f62376f208a9fb1e337fbea75c5726863f953 /decoders
parent80f8083b19da35f4cf015d6e612f3517635b04a4 (diff)
downloadlibsigrokdecode-a1f66576f4b5e6d13edeb7319cae9c09679aafa4.tar.gz
libsigrokdecode-a1f66576f4b5e6d13edeb7319cae9c09679aafa4.zip
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.
Diffstat (limited to 'decoders')
-rw-r--r--decoders/usb_power_delivery/pd.py2
1 files changed, 0 insertions, 2 deletions
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):