Added a missing file

This commit is contained in:
Abby Gourlay 2020-02-21 00:50:32 +00:00
parent 417b9fb938
commit e5cde15ad2

View file

@ -24,12 +24,8 @@ class Credentials(object):
def set_credentials(self, credentials):
self.credentials = credentials
def get_credentials(self, data=None):
if data is not None:
self._set(data)
return self._get()
def get_credentials(self):
return self.get()
def _ensure(self):
@ -46,12 +42,12 @@ class Credentials(object):
LOG.debug("credentials initialized with: %s", self.credentials)
self.credentials['Servers'] = self.credentials.setdefault('Servers', [])
def _get(self):
def get(self):
self._ensure()
return self.credentials
def _set(self, data):
def set(self, data):
if data:
self.credentials.update(data)
@ -128,4 +124,4 @@ class Credentials(object):
# Known Kodi/python error
date_obj = datetime(*(time.strptime(date, "%Y-%m-%dT%H:%M:%SZ")[0:6]))
return date_obj
return date_obj