示例#1
0
文件: rpc.py 项目: KK1423/piazza-api
    def _check_authenticated(self):
        """Check that we're logged in and raise an exception if not.

        :raises: NotAuthenticatedError
        """
        if not self.session.cookies:
            raise NotAuthenticatedError("You must authenticate before "
                                        "making any other requests.")
示例#2
0
    def _check_authenticated(self):
        """_check_authenticated checks the user is logged in and raises errors.
        
        :returns: None
        :rtype: None
        :raises NotAuthenticatedError: if user is not authenticated
        """
        if not self.session.cookies:
            raise NotAuthenticatedError("You must authenticate before making" +
                                        " any requests.")

        return None