From 4f84746736d4038f46b46957b1e41eaf4c93efcd Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 11 Dec 2020 23:35:48 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Improve=20blueprint=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- royalnet/engineer/blueprints/message.py | 1 + royalnet/engineer/blueprints/user.py | 1 + royalnet/engineer/exc.py | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/royalnet/engineer/blueprints/message.py b/royalnet/engineer/blueprints/message.py index b10e1cb7..3ce12080 100644 --- a/royalnet/engineer/blueprints/message.py +++ b/royalnet/engineer/blueprints/message.py @@ -45,6 +45,7 @@ class Message(Blueprint, metaclass=abc.ABCMeta): :raises .exc.NeverAvailableError: If the chat platform does not support channels. :raises .exc.NotAvailableError: If this message was not sent in any channel. """ + raise exc.NeverAvailableError() __all__ = ( diff --git a/royalnet/engineer/blueprints/user.py b/royalnet/engineer/blueprints/user.py index c44fc970..81fd473f 100644 --- a/royalnet/engineer/blueprints/user.py +++ b/royalnet/engineer/blueprints/user.py @@ -27,6 +27,7 @@ class User(Blueprint, metaclass=abc.ABCMeta): :param session: A :class:`sqlalchemy.orm.Session` instance to use to fetch the database entry. :return: The database entry for this user. """ + raise exc.NeverAvailableError() __all__ = ( diff --git a/royalnet/engineer/exc.py b/royalnet/engineer/exc.py index 39b1eb0d..07bb9e99 100644 --- a/royalnet/engineer/exc.py +++ b/royalnet/engineer/exc.py @@ -19,7 +19,7 @@ class NeverAvailableError(BlueprintError, NotImplementedError): The requested property is never supplied by the chat platform the message was sent in. """ - priority = -1 + priority = 1 class NotAvailableError(BlueprintError): @@ -27,7 +27,7 @@ class NotAvailableError(BlueprintError): The requested property was not supplied by the chat platform for the specific message this exception was raised in. """ - priority = -2 + priority = 2 class TeleporterError(EngineerException, pydantic.ValidationError):