diff options
author | drebs <drebs@riseup.net> | 2017-10-04 16:00:06 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-10-05 09:43:40 -0300 |
commit | 3b3652a915032609dcf458676b4bb85762e6b687 (patch) | |
tree | b0a2aaea16ccf43da18c7f7e28597d84370c2135 | |
parent | 649f99551a18ae16ae25e9d7cc042c216ca34561 (diff) |
[bug] don't use hardcoded number of retries when downloading blobs
-rw-r--r-- | src/leap/soledad/client/_db/blobs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/soledad/client/_db/blobs.py b/src/leap/soledad/client/_db/blobs.py index afa4c79f..0848c0b7 100644 --- a/src/leap/soledad/client/_db/blobs.py +++ b/src/leap/soledad/client/_db/blobs.py @@ -557,10 +557,10 @@ class BlobManager(object): message += "There is a chance of tampering. If this problem " message += "persists, please check your connection then report to " message += "your provider sysadmin and submit a bug report." - message = message % (blob_id, retries, 3 - retries) + message = message % (blob_id, retries, self.max_retries - retries) logger.error(message) yield self.local.increment_retries(blob_id) - if (retries + 1) >= 3: + if (retries + 1) >= self.max_retries: failed_download = SyncStatus.FAILED_DOWNLOAD yield self.local.update_sync_status(blob_id, failed_download) raise e |