Ticket #3717: postfix.patch
| File postfix.patch, 0.7 KB (added by cary, 4 years ago) |
|---|
-
postfix.py
113 113 114 114 def get(self, key): 115 115 return defer.succeed(self.data.get(key)) 116 117 if __name__ == '__main__':118 """Test app for PostfixTCPMapServer. Call with parameters119 KEY1=VAL1 KEY2=VAL2 ..."""120 from twisted.internet import reactor121 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 = arg128 v = ''129 d[k]=v130 f=PostfixTCPMapDictServerFactory(d)131 port = reactor.listenTCP(4242, f, interface='127.0.0.1')132 reactor.run()
