Ticket #3717: postfix.patch

File postfix.patch, 747 bytes (added by cary, 8 years ago)
  • postfix.py

     
    113113
    114114    def get(self, key):
    115115        return defer.succeed(self.data.get(key))
    116 
    117 if __name__ == '__main__':
    118     """Test app for PostfixTCPMapServer. Call with parameters
    119     KEY1=VAL1 KEY2=VAL2 ..."""
    120     from twisted.internet import reactor
    121     log.startLogging(sys.stdout)
    122     d = {}
    123     for arg in sys.argv[1:]:
    124         try:
    125             k,v = arg.split('=', 1)
    126         except ValueError:
    127             k = arg
    128             v = ''
    129         d[k]=v
    130     f=PostfixTCPMapDictServerFactory(d)
    131     port = reactor.listenTCP(4242, f, interface='127.0.0.1')
    132     reactor.run()