From f1c010fc4119d6348d0bd823e4a9f6da310149bd Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 31 Oct 2017 06:21:31 -0300 Subject: [style] wrong/missing docs/comments (code review) --- src/leap/soledad/client/_db/blobs/sync.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/leap/soledad/client/_db/blobs/sync.py') diff --git a/src/leap/soledad/client/_db/blobs/sync.py b/src/leap/soledad/client/_db/blobs/sync.py index d47033b2..838b87e5 100644 --- a/src/leap/soledad/client/_db/blobs/sync.py +++ b/src/leap/soledad/client/_db/blobs/sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# _blobs.py +# sync.py # Copyright (C) 2017 LEAP # # This program is free software: you can redistribute it and/or modify @@ -37,6 +37,11 @@ MAX_WAIT = 60 # In seconds. Max time between retries @defer.inlineCallbacks def with_retry(func, *args, **kwargs): + """ + Run func repeatedly until success, as long as the exception raised is + a "retriable error". If an exception of another kind is raised by func, + the retrying stops and that exception is propagated up the stack. + """ retry_wait = 1 retriable_errors = (error.ConnectError, error.ConnectionClosed, RetriableTransferError,) -- cgit v1.2.3