From a94ce482f3d86b1cf5bf6aee8f6260e4ad4027af Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Wed, 5 Jun 2019 17:37:53 -0600 Subject: [PATCH] Made server configs non-optional --- libremsonic/server/server.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/libremsonic/server/server.py b/libremsonic/server/server.py index daacad3..8a49395 100644 --- a/libremsonic/server/server.py +++ b/libremsonic/server/server.py @@ -9,16 +9,12 @@ from .api_objects import (SubsonicResponse, License, MusicFolder, Indexes, class Server: """Defines a *Sonic server.""" - def __init__(self, - name: str = None, - hostname: str = None, - username: str = None, - password: str = None): + def __init__(self, name: str, hostname: str, username: str, password: str): # TODO handle these optionals better. - self.name: str = name or '' - self.hostname: str = hostname or '' - self.username: str = username or '' - self.password: str = password or '' + self.name: str = name + self.hostname: str = hostname + self.username: str = username + self.password: str = password def _get_params(self) -> Dict[str, str]: """See Subsonic API Introduction for details."""