From 7265682a4d57d88956cb54f98f7a470465bbf417 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 00:52:24 +0200 Subject: cleanup semicolons, whitespace and mutable default arguments --- sleekxmpp/componentxmpp.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/componentxmpp.py') diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index bac455e2..4b229a6f 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -49,8 +49,13 @@ class ComponentXMPP(BaseXMPP): Defaults to ``False``. """ - def __init__(self, jid, secret, host=None, port=None, - plugin_config={}, plugin_whitelist=[], use_jc_ns=False): + def __init__(self, jid, secret, host=None, port=None, plugin_config=None, plugin_whitelist=None, use_jc_ns=False): + + if not plugin_whitelist: + plugin_whitelist = [] + if not plugin_config: + plugin_config = {} + if use_jc_ns: default_ns = 'jabber:client' else: -- cgit v1.2.3 From 3dd379cdf12d885e26f8ec26c54879a95d5f0b84 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 15:15:14 +0200 Subject: Revert "cleanup semicolons, whitespace and mutable default arguments" This reverts commit 7265682a4d57d88956cb54f98f7a470465bbf417. --- sleekxmpp/componentxmpp.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'sleekxmpp/componentxmpp.py') diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index 4b229a6f..bac455e2 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -49,13 +49,8 @@ class ComponentXMPP(BaseXMPP): Defaults to ``False``. """ - def __init__(self, jid, secret, host=None, port=None, plugin_config=None, plugin_whitelist=None, use_jc_ns=False): - - if not plugin_whitelist: - plugin_whitelist = [] - if not plugin_config: - plugin_config = {} - + def __init__(self, jid, secret, host=None, port=None, + plugin_config={}, plugin_whitelist=[], use_jc_ns=False): if use_jc_ns: default_ns = 'jabber:client' else: -- cgit v1.2.3 From afc939708ff71e168f9204f1eab8823b7dc9f875 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 00:52:24 +0200 Subject: cleanup semicolons, whitespace and mutable default arguments --- sleekxmpp/componentxmpp.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/componentxmpp.py') diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index bac455e2..4b229a6f 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -49,8 +49,13 @@ class ComponentXMPP(BaseXMPP): Defaults to ``False``. """ - def __init__(self, jid, secret, host=None, port=None, - plugin_config={}, plugin_whitelist=[], use_jc_ns=False): + def __init__(self, jid, secret, host=None, port=None, plugin_config=None, plugin_whitelist=None, use_jc_ns=False): + + if not plugin_whitelist: + plugin_whitelist = [] + if not plugin_config: + plugin_config = {} + if use_jc_ns: default_ns = 'jabber:client' else: -- cgit v1.2.3