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.")
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