comparison src/plugins/plugin_xep_0045.py @ 451:4f196e2d3781

plugin xep-0045: fixed missing return deferred
author Goffi <goffi@goffi.org>
date Thu, 05 Jan 2012 00:42:24 +0100
parents afe9cfd2ddbb
children fd455b3ca6d4
comparison
equal deleted inserted replaced
450:afe9cfd2ddbb 451:4f196e2d3781
138 138
139 def join(self, room_jid, nick, options, profile_key='@DEFAULT@'): 139 def join(self, room_jid, nick, options, profile_key='@DEFAULT@'):
140 def _errDeferred(exc_obj = Exception, txt='Error while joining room'): 140 def _errDeferred(exc_obj = Exception, txt='Error while joining room'):
141 d = defer.Deferred() 141 d = defer.Deferred()
142 d.errback(exc_obj(txt)) 142 d.errback(exc_obj(txt))
143 return d
143 144
144 profile = self.host.memory.getProfileName(profile_key) 145 profile = self.host.memory.getProfileName(profile_key)
145 if not self.__check_profile(profile): 146 if not self.__check_profile(profile):
146 return _errDeferred() 147 return _errDeferred()
147 if self.clients[profile].joined_rooms.has_key(room_jid.userhost()): 148 if self.clients[profile].joined_rooms.has_key(room_jid.userhost()):