]> sigrok.org Git - libsigrokdecode.git/commitdiff
usb_request: Use "is" or "is not" with None.
authorUwe Hermann <redacted>
Sat, 24 Sep 2016 11:20:16 +0000 (13:20 +0200)
committerUwe Hermann <redacted>
Sat, 24 Sep 2016 11:20:16 +0000 (13:20 +0200)
decoders/usb_request/pd.py

index 39a9df6af60fe822b77424593c7c4e1d1d313eef..bb7aedc5dd8e483f4bbad36d53cca989fd572a83 100644 (file)
@@ -201,7 +201,7 @@ class Decoder(srd.Decoder):
             self.handle_request(request_started, request_end)
 
         # CONTROL, SETUP stage
-        elif request['type'] == None and self.transaction_type == 'SETUP':
+        elif request['type'] is None and self.transaction_type == 'SETUP':
             request['setup_data'] = self.transaction_data
             request['wLength'] = struct.unpack('<H',
                 bytes(self.transaction_data[6:8]))[0]