Ejemplo n.º 1
0
    def _checkAuth(self):

        if not self.username or not self.password:
            raise AuthException("Your authentication credentials for " +
                                self.name + " are missing, check your config.")

        return True
Ejemplo n.º 2
0
    def _checkAuthFromData(self, parsedJSON):

        if parsedJSON is None:
            return self._checkAuth()

        if 'api-error' in parsedJSON:
            sickrage.srLogger.debug(
                "Incorrect authentication credentials: % s" %
                parsedJSON['api-error'])
            raise AuthException("Your authentication credentials for " +
                                self.name +
                                " are incorrect, check your config.")

        return True
Ejemplo n.º 3
0
    def _checkAuth(self):
        if not self.api_key:
            raise AuthException('Your authentication credentials for ' +
                                self.name + ' are missing, check your config.')

        return True
Ejemplo n.º 4
0
    def _checkAuth(self):
        if self.username and self.password:
            return True

        raise AuthException('Your authentication credentials for ' +
                            self.name + ' are missing, check your config.')