comparison jabberbot/xmlrpcbot.py @ 2128:401d49b9f1ac

Make sure that the ticket and multicall object are deleted.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Fri, 15 Jun 2007 22:13:25 +0200
parents 42232c6ac004
children ea879bd7935d
comparison
equal deleted inserted replaced
2127:42232c6ac004 2128:401d49b9f1ac
79 79
80 if self.token: 80 if self.token:
81 self.multicall.applyAuthToken(self.token) 81 self.multicall.applyAuthToken(self.token)
82 82
83 try: 83 try:
84 function(self, command) 84 try:
85 self.commands_out.put_nowait(command) 85 function(self, command)
86 except xmlrpclib.Fault, fault: 86 self.commands_out.put_nowait(command)
87 msg = u"""Your request has failed. The reason is:\n%s""" 87 except xmlrpclib.Fault, fault:
88 notification = cmd.NotificationCommand(command.jid, msg % (fault.faultString, )) 88 msg = u"""Your request has failed. The reason is:\n%s"""
89 self.commands_out.put_nowait(notification) 89 notification = cmd.NotificationCommand(command.jid, msg % (fault.faultString, ))
90 90 self.commands_out.put_nowait(notification)
91 del self.token 91 finally:
92 del self.multicall 92 del self.token
93 del self.multicall
93 94
94 return wrapped_func 95 return wrapped_func
95 96
96 def get_page(self, command): 97 def get_page(self, command):
97 """Returns a raw page""" 98 """Returns a raw page"""