def _parse_incoming_sms(self, lines):

        output_lines = []
        n = 0

        # iterate the lines like it's 1984
        # (because we're patching the array,
        # which is hard work for iterators)
        while n < len(lines):

            # not a CMT string? add it back into the
            # output (since we're not interested in it)
            # and move on to the next
            if lines[n][0:5] != "+CMT:":
                output_lines.append(lines[n])
                n += 1
                continue

            msg_line = lines[n+1].strip()

            # notify the network that we accepted
            # the incoming message (for read receipt)
            # BEFORE pushing it to the incoming queue
            # (to avoid really ugly race condition if
            # the message is grabbed from the queue
            # and responded to quickly, before we get
            # a chance to issue at+cnma)
            try:
                self.command("AT+CNMA")

            # Some networks don't handle notification, in which case this
            # fails. Not a big deal, so ignore.
            except errors.GsmError:
                #self.log("Receipt acknowledgement (CNMA) was rejected")
                # TODO: also log this!
                pass

            msg = self.smshandler.parse_incoming_message(lines[n], msg_line)
            if msg is not None:
                self.incoming_queue.append(msg)

            # jump over the CMT line, and the
            # pdu line, and continue iterating
            n += 2
 
        # return the lines that we weren't
        # interested in (almost all of them!)
        return output_lines
Remove the given file.
dataset/ETHPy150Open sahana/eden/modules/pygsm/gsmmodem.py/GsmModem._parse_incoming_sms--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/ssh/filetransfer.py/FileTransferClient.removeFile