Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
-
964d31b5
by Philipp Hörist at 2018-05-18T17:11:06+02:00
-
467572b7
by Philipp Hörist at 2018-05-18T17:14:18+02:00
2 changed files:
Changes:
| ... | ... | @@ -601,12 +601,13 @@ class NonBlockingClient(object): |
| 601 | 601 |
self.NonBlockingBind.NonBlockingBind(self._Resource, self._on_sasl_auth)
|
| 602 | 602 |
return True
|
| 603 | 603 |
|
| 604 |
- def initRoster(self, version=''):
|
|
| 604 |
+ def initRoster(self, version='', request=True):
|
|
| 605 | 605 |
"""
|
| 606 | 606 |
Plug in the roster
|
| 607 | 607 |
"""
|
| 608 | 608 |
if 'NonBlockingRoster' not in self.__dict__:
|
| 609 |
- return roster_nb.NonBlockingRoster.get_instance(version=version).PlugIn(self)
|
|
| 609 |
+ return roster_nb.NonBlockingRoster.get_instance(
|
|
| 610 |
+ version=version).PlugIn(self, request=request)
|
|
| 610 | 611 |
|
| 611 | 612 |
def getRoster(self, on_ready=None, force=False):
|
| 612 | 613 |
"""
|
| ... | ... | @@ -37,7 +37,7 @@ class PlugIn(object): |
| 37 | 37 |
def __init__(self):
|
| 38 | 38 |
self._exported_methods=[]
|
| 39 | 39 |
|
| 40 |
- def PlugIn(self, owner):
|
|
| 40 |
+ def PlugIn(self, owner, *args, **kwargs):
|
|
| 41 | 41 |
"""
|
| 42 | 42 |
Attach to owner and register ourself and our _exported_methods in it.
|
| 43 | 43 |
If defined by a subclass, call self.plugin(owner) to execute hook
|
| ... | ... | @@ -62,9 +62,9 @@ class PlugIn(object): |
| 62 | 62 |
|
| 63 | 63 |
# Execute hook
|
| 64 | 64 |
if hasattr(self, 'plugin'):
|
| 65 |
- return self.plugin(owner)
|
|
| 65 |
+ return self.plugin(owner, *args, **kwargs)
|
|
| 66 | 66 |
|
| 67 |
- def PlugOut(self):
|
|
| 67 |
+ def PlugOut(self, *args, **kwargs):
|
|
| 68 | 68 |
"""
|
| 69 | 69 |
Unregister our _exported_methods from owner and detach from it.
|
| 70 | 70 |
If defined by a subclass, call self.plugout() after unplugging to execute
|
| ... | ... | @@ -82,7 +82,7 @@ class PlugIn(object): |
| 82 | 82 |
del self._owner.__dict__[self.__class__.__name__]
|
| 83 | 83 |
# Execute hook
|
| 84 | 84 |
if hasattr(self, 'plugout'):
|
| 85 |
- return self.plugout()
|
|
| 85 |
+ return self.plugout(*args, **kwargs)
|
|
| 86 | 86 |
del self._owner
|
| 87 | 87 |
|
| 88 | 88 |
@classmethod
|