]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2cdemux/i2cdemux.py
srd: Properly use append() for appending to lists.
[libsigrokdecode.git] / decoders / i2cdemux / i2cdemux.py
index a597188fc95b695e3ff8c4de76cdac6723a9c48c..c4c0d3b09fe68150415aa744eda3f24adf640fc7 100644 (file)
@@ -60,7 +60,7 @@ class Decoder(srd.Decoder):
         cmd, databyte, ack = data
 
         # Add the I2C packet to our local cache.
         cmd, databyte, ack = data
 
         # Add the I2C packet to our local cache.
-        self.packets += [[ss, es, data]]
+        self.packets.append([ss, es, data])
 
         if cmd in ('ADDRESS READ', 'ADDRESS WRITE'):
             if databyte in self.slaves:
 
         if cmd in ('ADDRESS READ', 'ADDRESS WRITE'):
             if databyte in self.slaves:
@@ -68,9 +68,9 @@ class Decoder(srd.Decoder):
                 return
 
             # We're never seen this slave, add a new stream.
                 return
 
             # We're never seen this slave, add a new stream.
-            self.slaves += [databyte]
-            self.out_proto += [self.add(srd.OUTPUT_PROTO,
-                               'i2c-%s' % hex(databyte))]
+            self.slaves.append(databyte)
+            self.out_proto.append(self.add(srd.OUTPUT_PROTO,
+                                  'i2c-%s' % hex(databyte)))
             self.stream = self.streamcount
             self.streamcount += 1
         elif cmd == 'STOP':
             self.stream = self.streamcount
             self.streamcount += 1
         elif cmd == 'STOP':