From f2779197b13fdbbd0d42e48215c51d24d86ee91b Mon Sep 17 00:00:00 2001 From: Diego Roversi Date: Thu, 12 Sep 2019 21:33:58 +0200 Subject: 2to3 of display module --- display/puremixer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'display/puremixer.py') diff --git a/display/puremixer.py b/display/puremixer.py index d0b567a..52d56d4 100644 --- a/display/puremixer.py +++ b/display/puremixer.py @@ -64,7 +64,7 @@ class PureMixer: byteorder = self.byteorder # done if (freq, bytes, signed, channels, byteorder) != self.parameters: - raise ValueError, 'sound sample conversion failed' + raise ValueError('sound sample conversion failed') return data def wavesample(self, file): @@ -87,7 +87,7 @@ class PureMixer: channels = mixer_channels[:] channels.reverse() for c in channels: - if already_seen.has_key(c): + if c in already_seen: data1 = '' else: data1 = c.read(bufsize) @@ -114,10 +114,10 @@ def byteswap(data, byte): elif byte == 4: typecode = 'i' else: - raise ValueError, 'cannot convert endianness for samples of %d bytes' % byte + raise ValueError('cannot convert endianness for samples of %d bytes' % byte) import array a = array.array(typecode, data) if a.itemsize != byte: - raise ValueError, 'endianness convertion failed' + raise ValueError('endianness convertion failed') a.byteswap() return a.tostring() -- cgit v1.2.3