From 3194cec8df7bc224e797d67488ebd23a2c2484d1 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 19 Nov 2019 14:13:15 -0500 Subject: [PATCH] added missing files --- lbry/lbry/error/Makefile | 2 ++ lbry/lbry/error/README.md | 4 ++-- lbry/lbry/error/__init__.py | 6 +++--- lbry/lbry/error/base.py | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 lbry/lbry/error/Makefile create mode 100644 lbry/lbry/error/base.py diff --git a/lbry/lbry/error/Makefile b/lbry/lbry/error/Makefile new file mode 100644 index 000000000..de22ed03c --- /dev/null +++ b/lbry/lbry/error/Makefile @@ -0,0 +1,2 @@ +generate: + python generate.py > __init__.py diff --git a/lbry/lbry/error/README.md b/lbry/lbry/error/README.md index 41cdc507f..d20f02ddf 100644 --- a/lbry/lbry/error/README.md +++ b/lbry/lbry/error/README.md @@ -53,8 +53,8 @@ Code | Name | Message | Comment **32x** | ChannelSigning | Channel signing. 320 | ChannelKeyNotFound | Channel signing key not found. 321 | ChannelKeyInvalid | Channel signing key is out of date. | For example, channel was updated but you don't have the updated key. -**33x** | Resolve | Errors while resolving urls. -331 | ResolveError | Failed to resolve '{uri}'. +**33x** | GeneralResolve | Errors while resolving urls. +331 | Resolve | Failed to resolve '{uri}'. 332 | ResolveTimeout | Failed to resolve '{uri}' within the timeout. **4xx** | Blob | **Blobs** **40x** | BlobAvailability | Blob availability. diff --git a/lbry/lbry/error/__init__.py b/lbry/lbry/error/__init__.py index 471725e89..1ee0e2370 100644 --- a/lbry/lbry/error/__init__.py +++ b/lbry/lbry/error/__init__.py @@ -313,18 +313,18 @@ class ChannelKeyInvalidError(ChannelSigningError): super().__init__("Channel signing key is out of date.") -class ResolveError(BlockchainError): +class GeneralResolveError(BlockchainError): """ Errors while resolving urls. """ -class ResolveErrorError(ResolveError): +class ResolveError(GeneralResolveError): def __init__(self, uri): super().__init__(f"Failed to resolve '{uri}'.") -class ResolveTimeoutError(ResolveError): +class ResolveTimeoutError(GeneralResolveError): def __init__(self, uri): super().__init__(f"Failed to resolve '{uri}' within the timeout.") diff --git a/lbry/lbry/error/base.py b/lbry/lbry/error/base.py new file mode 100644 index 000000000..1d2f0f30a --- /dev/null +++ b/lbry/lbry/error/base.py @@ -0,0 +1,2 @@ +class BaseError(Exception): + pass