From 1bf34f7fe694c2997710e0d23b0784e824df5e5e Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 00:18:10 +0200 Subject: fix mutable default arguments :boom: --- sleekxmpp/clientxmpp.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sleekxmpp/clientxmpp.py') diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py index f837c0f2..8db6ef17 100644 --- a/sleekxmpp/clientxmpp.py +++ b/sleekxmpp/clientxmpp.py @@ -52,7 +52,6 @@ class ClientXMPP(BaseXMPP): :param jid: The JID of the XMPP user account. :param password: The password for the XMPP user account. - :param ssl: **Deprecated.** :param plugin_config: A dictionary of plugin configurations. :param plugin_whitelist: A list of approved plugins that will be loaded when calling @@ -60,8 +59,13 @@ class ClientXMPP(BaseXMPP): :param escape_quotes: **Deprecated.** """ - def __init__(self, jid, password, plugin_config={}, plugin_whitelist=[], - escape_quotes=True, sasl_mech=None, lang='en'): + def __init__(self, jid, password, plugin_config=None, plugin_whitelist=None, escape_quotes=True, sasl_mech=None, + lang='en'): + if not plugin_whitelist: + plugin_whitelist = [] + if not plugin_config: + plugin_config = {} + BaseXMPP.__init__(self, jid, 'jabber:client') self.escape_quotes = escape_quotes -- cgit v1.2.3 From f00177c0cf5512a86b37ba69fc627ddf92abdc6b Mon Sep 17 00:00:00 2001 From: Sangeeth Saravanaraj Date: Fri, 3 Jul 2015 10:47:06 +0530 Subject: Added **kwargs to ClientXMPP, BaseXMPP and XMLStream so that certfile, keyfile and ca_certs can be initialized. --- sleekxmpp/clientxmpp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sleekxmpp/clientxmpp.py') diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py index 8db6ef17..31a5a70b 100644 --- a/sleekxmpp/clientxmpp.py +++ b/sleekxmpp/clientxmpp.py @@ -59,14 +59,15 @@ class ClientXMPP(BaseXMPP): :param escape_quotes: **Deprecated.** """ - def __init__(self, jid, password, plugin_config=None, plugin_whitelist=None, escape_quotes=True, sasl_mech=None, - lang='en'): + def __init__(self, jid, password, plugin_config=None, + plugin_whitelist=None, escape_quotes=True, sasl_mech=None, + lang='en', **kwargs): if not plugin_whitelist: plugin_whitelist = [] if not plugin_config: plugin_config = {} - BaseXMPP.__init__(self, jid, 'jabber:client') + BaseXMPP.__init__(self, jid, 'jabber:client', **kwargs) self.escape_quotes = escape_quotes self.plugin_config = plugin_config -- cgit v1.2.3