This repository was archived by the owner on Nov 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Version 0.6.0
1414* ``UOSDevice.device `` set protected to avoid confusion and misuse.
1515 This is primarily for internal use and where it is required for clients
1616 getter methods such as ``get_pin `` should be provided.
17+ * Removed checks to ``COMResult.exception `` length in internal code as it is
18+ sufficient to just check ``COMResult.status ``.
1719
1820Version 0.5.0
1921-------------
Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ class Device:
337337
338338 def update_adc_samples (self , result : ComResult ):
339339 """Update the pin samples with the response of a get_adc_input."""
340- if not result .status or len ( result . exception ) != 0 :
340+ if not result .status :
341341 raise UOSRuntimeError ("Can't update ADC samples from a failed response." )
342342 if result .tx_packet is None or len (result .rx_packets ) < 1 :
343343 raise UOSRuntimeError ("Can't update ADC samples without a valid result." )
@@ -367,7 +367,7 @@ def update_adc_samples(self, result: ComResult):
367367
368368 def update_gpio_samples (self , result : ComResult ):
369369 """Update the pin samples with the response of a get_gpio_inpout."""
370- if not result .status or len ( result . exception ) != 0 :
370+ if not result .status :
371371 raise UOSRuntimeError ("Can't update GPIO samples from a failed responsee." )
372372 if result .tx_packet is None or len (result .rx_packets ) < 1 :
373373 raise UOSRuntimeError ("Can't update GPIO samples without a valid result." )
You can’t perform that action at this time.
0 commit comments