diff options
Diffstat (limited to 'decoders/i2s')
-rw-r--r-- | decoders/i2s/__init__.py | 1 | ||||
-rw-r--r-- | decoders/i2s/pd.py | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/decoders/i2s/__init__.py b/decoders/i2s/__init__.py index b9c0ed7..550a8c8 100644 --- a/decoders/i2s/__init__.py +++ b/decoders/i2s/__init__.py @@ -28,4 +28,3 @@ http://en.wikipedia.org/wiki/I2s ''' from .pd import * - diff --git a/decoders/i2s/pd.py b/decoders/i2s/pd.py index dc42a4e..8b45a75 100644 --- a/decoders/i2s/pd.py +++ b/decoders/i2s/pd.py @@ -93,8 +93,8 @@ class Decoder(srd.Decoder): # Calculate the sample rate. samplerate = '?' - if self.start_sample != None and \ - self.first_sample != None and \ + if self.start_sample is not None and \ + self.first_sample is not None and \ self.start_sample > self.first_sample: samplerate = '%d' % (self.samplesreceived * self.samplerate / (self.start_sample - @@ -151,7 +151,7 @@ class Decoder(srd.Decoder): continue # Only submit the sample, if we received the beginning of it. - if self.start_sample != None: + if self.start_sample is not None: if not self.wrote_wav_header: self.put(0, 0, self.out_bin, (0, self.wav_header())) @@ -182,8 +182,7 @@ class Decoder(srd.Decoder): self.start_sample = self.samplenum # Save the first sample position. - if self.first_sample == None: + if self.first_sample is None: self.first_sample = self.samplenum self.oldws = ws - |