From 2e7b8c6dfc8dfa544949f3d8ad6648a1c62dda96 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 4 Oct 2017 15:14:17 -0300 Subject: [style] rename exception to match standards We have been using "Error" instead of "Exception" in exception names, so this commit is only enforcing an unwritten policy. --- src/leap/soledad/client/_db/blobs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/leap/soledad/client/_db/blobs.py b/src/leap/soledad/client/_db/blobs.py index bbb21b7c..961217f4 100644 --- a/src/leap/soledad/client/_db/blobs.py +++ b/src/leap/soledad/client/_db/blobs.py @@ -147,7 +147,7 @@ def check_http_status(code, blob_id=None, flags=None): raise SoledadError("Server Error: %s" % code) -class RetriableTransferException(Exception): +class RetriableTransferError(Exception): pass @@ -164,7 +164,7 @@ MAX_WAIT = 60 # In seconds. Max time between retries def with_retry(func, *args, **kwargs): retry_wait = 1 retriable_errors = (error.ConnectError, error.ConnectionClosed, - RetriableTransferException,) + RetriableTransferError,) while True: try: yield func(*args, **kwargs) @@ -545,7 +545,7 @@ class BlobManager(object): yield self.local.update_sync_status(blob_id, failed_download) raise e else: - raise RetriableTransferException() + raise RetriableTransferError() logger.info("Finished download: (%s, %d)" % (blob_id, size)) defer.returnValue((fd, size)) -- cgit v1.2.3