]> sigrok.org Git - libsigrokdecode.git/commitdiff
Comparison to None should use "is/is not" instead of "==/!="
authorRyan Jarvis <redacted>
Sat, 19 Jan 2019 07:43:26 +0000 (23:43 -0800)
committerUwe Hermann <redacted>
Tue, 29 Jan 2019 22:43:49 +0000 (23:43 +0100)
decoders/jtag_ejtag/pd.py

index ba5db2a05897c3291b5b4c70c8221b4976938568..e327e89ac937f6383b0be63b0f20c5ea3937d496 100644 (file)
@@ -247,14 +247,14 @@ class Decoder(srd.Decoder):
         s += 'Store' if pracc_write else 'Load/Fetch'
 
         if pracc_write:
-            if self.pracc_state.address_out != None:
+            if self.pracc_state.address_out is not None:
                 s += ', A:' + ' 0x{:08X}'.format(self.pracc_state.address_out)
-            if self.pracc_state.data_out != None:
+            if self.pracc_state.data_out is not None:
                 s += ', D:' + ' 0x{:08X}'.format(self.pracc_state.data_out)
         else:
-            if self.pracc_state.address_out != None:
+            if self.pracc_state.address_out is not None:
                 s += ', A:' + ' 0x{:08X}'.format(self.pracc_state.address_out)
-            if self.pracc_state.data_in != None:
+            if self.pracc_state.data_in is not None:
                 s += ', D:' + ' 0x{:08X}'.format(self.pracc_state.data_in)
 
         self.pracc_state.reset()