def attach(self, timeout, wait=True):
        if self.attachment_status == apiAttachSuccess:
            return
        self.acquire()
        try:
            if not self.isAlive():
                try:
                    self.start()
                except AssertionError:
                    raise SkypeAPIError('Skype API closed')
            try:
                self.wait = True
                t = threading.Timer(timeout2float(timeout), lambda: setattr(self, 'wait', False))
                if wait:
                    t.start()
                while self.wait:
                    self.win_skype = self.get_skype()
                    if self.win_skype is not None:
                        break
                    else:
                        time.sleep(1.0)
                else:
                    raise SkypeAPIError('Skype attach timeout')
            finally:
                t.cancel()
            command = Command(self.friendly_name % 'NAME %s', '', True, timeout)
            self.release()
            try:
                self.send_command(command, True)
            finally:
                self.acquire()
            if command.Reply != 'OK':
                self.win_skype = None
                self.set_attachment_status(apiAttachRefused)
                return
            self.set_attachment_status(apiAttachSuccess)
        finally:
            self.release()
        command = Command('PROTOCOL %s' % self.protocol, Blocking=True)
        self.send_command(command, True)
        self.protocol = int(command.Reply.rsplit(None, 1)[-1])
dataset/ETHPy150Open Skype4Py/Skype4Py/Skype4Py/api/posix_x11.py/SkypeAPI.attach/swapped operands of `%`