def _set_auth(self, user, password):
        """
        Set authentication parameters
        """
        if user is None or len(user.strip()) == 0:
            self._user = None
            self._password = None
            self._auth = None
        else:
            self._user = user.strip()
            if password:
                self._password = password.strip()
                try:
                    self._auth = aiohttp.BasicAuth(self._user, self._password, "utf-8")
                except ValueError as e:
                    log.error(str(e))
            else:
                self._password = None
                self._auth = aiohttp.BasicAuth(self._user, "")
def _set_auth ( self , user , password ) : if user is None or len ( user . strip ( ) ) == 0 : self . _user = None self . _password = None self . _auth = None else : self . _user = user . strip ( ) if password : self . _password = password . strip ( ) try : self . _auth = aiohttp . BasicAuth ( self . _user , self . _password , "utf-8" ) except ValueError as e : log . error ( str ( e ) ) else : self . _password = None self . _auth = aiohttp . BasicAuth ( self . _user , "" )
Set authentication parameters