Allow Api singleton attributes update

This commit is contained in:
2015-04-11 19:03:10 +02:00
parent 8612492743
commit b2e37d3b1d

View File

@@ -42,7 +42,7 @@ class Api(object):
def Default(**kwargs):
"""Initialize the API in a singleton style
"""
if Api._api_singleton is None:
if Api._api_singleton is None or kwargs:
Api._api_singleton = Api(
endpoint=kwargs["endpoint"] if kwargs.get("endpoint") else None,
username=kwargs["username"] if kwargs.get("username") else None,