comparison src/plugins/plugin_xep_0045.py @ 1700:0502a1fbe8b5

plugin XEP-0045: fixed bad default parameter
author Goffi <goffi@goffi.org>
date Sun, 29 Nov 2015 22:47:52 +0100
parents e0bde0d0b321
children 244a605623d6
comparison
equal deleted inserted replaced
1699:a72f04c67ac9 1700:0502a1fbe8b5
378 # FIXME: how to set the cancel method on the Deferred created by wokkel? 378 # FIXME: how to set the cancel method on the Deferred created by wokkel?
379 # This happens when the room is not reachable, e.g. no internet connection: 379 # This happens when the room is not reachable, e.g. no internet connection:
380 # > /usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py(480)_startRunCallbacks() 380 # > /usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py(480)_startRunCallbacks()
381 # -> raise AlreadyCalledError(extra) 381 # -> raise AlreadyCalledError(extra)
382 382
383 def _join(self, room_jid_s, nick, options={}, profile_key=C.PROF_KEY_NONE): 383 def _join(self, room_jid_s, nick, options=None, profile_key=C.PROF_KEY_NONE):
384 """join method used by bridge: use the join method, but doesn't return any deferred 384 """join method used by bridge: use the join method, but doesn't return any deferred
385 @return: unicode (the room bare) 385 @return: unicode (the room bare)
386 """ 386 """
387 if options is None:
388 options = {}
387 profile = self.host.memory.getProfileName(profile_key) 389 profile = self.host.memory.getProfileName(profile_key)
388 if not self.checkClient(profile): 390 if not self.checkClient(profile):
389 return 391 return
390 if room_jid_s: 392 if room_jid_s:
391 muc_service = self.host.getClient(profile).muc_service 393 muc_service = self.host.getClient(profile).muc_service