Ticket #6542: t6542.2.diff

File t6542.2.diff, 3.1 KB (added by Alex Gaynor, 7 years ago)

On a lark I grepped around and found a few more instances of this pattern.

  • twisted/mail/relaymanager.py

     
    306306        if self.manager.queue.noisy:
    307307            log.msg("Backing off on delivery of " + str(msgs))
    308308        def setWaiting(queue, messages):
    309             map(queue.setWaiting, messages)
     309            for message in messages:
     310                queue.setWaiting(message)
    310311        from twisted.internet import reactor
    311312        reactor.callLater(30, setWaiting, self.manager.queue, msgs)
    312313        del self.manager.managed[relay]
     
    435436        log.err('Error setting up managed relay factory for ' + domain)
    436437        log.err(failure)
    437438        def setWaiting(queue, messages):
    438             map(queue.setWaiting, messages)
     439            for message in messages:
     440                queue.setWaiting(message)
    439441        from twisted.internet import reactor
    440442        reactor.callLater(30, setWaiting, self.queue, self.managed[factory])
    441443        del self.managed[factory]
  • twisted/mail/mail.py

     
    263263
    264264    def addDomain(self, name, domain):
    265265        portal = Portal(domain)
    266         map(portal.registerChecker, domain.getCredentialsCheckers())
     266        for checker in domain.getCredentialsCheckers():
     267            portal.registerChecker(checker)
    267268        self.domains[name] = domain
    268269        self.portals[name] = portal
    269270        if self.aliases and IAliasableDomain.providedBy(domain):
  • twisted/internet/process.py

     
    676676
    677677            self._fork(path, uid, gid, executable, args, environment, fdmap=fdmap)
    678678        except:
    679             map(os.close, _openedPipes)
     679            for p in _openedPipes:
     680                os.close(p)
    680681            raise
    681682
    682683        # we are the parent process:
  • twisted/conch/ssh/connection.py

     
    5959        """
    6060        Called when the connection is stopped.
    6161        """
    62         map(self.channelClosed, self.channels.values())
     62        for chan in self.channels.values():
     63            self.channelClosed(chan)
    6364        self._cleanupGlobalDeferreds()
    6465
    6566
  • twisted/conch/insults/window.py

     
    359359        for n, ch in enumerate(self.children):
    360360            boxes[n % len(boxes)].addChild(ch)
    361361        h = HBox()
    362         map(h.addChild, boxes)
     362        for box in boxes:
     363            h.addChild(box)
    363364        h.render(width, height, terminal)
    364365
    365366