diff options
author | drebs <drebs@leap.se> | 2017-12-19 15:59:35 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-12-20 14:20:07 -0200 |
commit | e06ec89ddc26a6fd2c4c4925fd270c9f9a92bc19 (patch) | |
tree | 3a3e953617370e2dd4e3cf04a080425d36d43d5d | |
parent | 321407eb955d48128e973949379c26027a8bdf86 (diff) |
[refactor] move blobs errors to its own submodule
-rw-r--r-- | src/leap/soledad/server/_blobs/__init__.py | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/leap/soledad/server/_blobs/__init__.py b/src/leap/soledad/server/_blobs/__init__.py index 066b292e..8544c203 100644 --- a/src/leap/soledad/server/_blobs/__init__.py +++ b/src/leap/soledad/server/_blobs/__init__.py @@ -40,9 +40,13 @@ from zope.interface import implementer from leap.common.files import mkdir_p from leap.soledad.common.log import getLogger -from leap.soledad.server import interfaces from leap.soledad.common.blobs import ACCEPTED_FLAGS from leap.soledad.common.blobs import InvalidFlag +from leap.soledad.server import interfaces + +from .errors import BlobNotFound +from .errors import BlobExists +from .errors import QuotaExceeded __all__ = ['BlobsResource'] @@ -60,24 +64,6 @@ VALID_STRINGS = re.compile('^[a-zA-Z0-9_-]+$') # [ ] chunking (should we do it on the client or on the server?) -class BlobNotFound(Exception): - """ - Raised when a blob is not found in data storage backend. - """ - - -class BlobExists(Exception): - """ - Raised when a blob already exists in data storage backend. - """ - - -class QuotaExceeded(Exception): - """ - Raised when the quota would be exceeded if an operation would be held. - """ - - @implementer(interfaces.IBlobsBackend) class FilesystemBlobsBackend(object): |