comparison libervia.tac @ 277:ea2d4f464b5a

server side: fixed bad async bridge calls management
author Goffi <goffi@goffi.org>
date Fri, 13 Dec 2013 17:10:35 +0100
parents a763b2ac5d41
children 2d6bd975a72d
comparison
equal deleted inserted replaced
276:aebb96bfa8d1 277:ea2d4f464b5a
146 d.callback(args[0]) 146 d.callback(args[0])
147 147
148 def _errback(result): 148 def _errback(result):
149 d.errback(Failure(unicode(result))) 149 d.errback(Failure(unicode(result)))
150 150
151 kwargs["callback"] = d.callback 151 kwargs["callback"] = _callback
152 kwargs["errback"] = _errback 152 kwargs["errback"] = _errback
153 getattr(self.sat_host.bridge, method_name)(*args, **kwargs) 153 getattr(self.sat_host.bridge, method_name)(*args, **kwargs)
154 return d 154 return d
155 155
156 156
604 return "BAD REQUEST" 604 return "BAD REQUEST"
605 605
606 def registered(result): 606 def registered(result):
607 request.write('REGISTRATION') 607 request.write('REGISTRATION')
608 request.finish() 608 request.finish()
609 #import pudb
610 #pudb.set_trace()
611 609
612 def registeringError(failure): 610 def registeringError(failure):
613 reason = str(failure.value) 611 reason = str(failure.value)
614 if reason == "CONFLICT": 612 if reason == "CONFLICT":
615 request.write('ALREADY EXISTS') 613 request.write('ALREADY EXISTS')