duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] backend query_info question


From: Michael Terry
Subject: Re: [Duplicity-talk] backend query_info question
Date: Mon, 2 Jan 2012 11:34:23 -0500

On 31 December 2011 12:28,  <address@hidden> wrote:
> btw. what did you implement the 'raise_errors' parameter for?

raise_errors is an argument used by the @retry decorator.  It
simplifies the writing of 'proper' duplicity backend calls by trying
max_retries times.

The first N-1 times, it will call with raise_errors=True.  On an
error, the backend raises an exception, which tells the decorator to
retry.

On the Nth time, it will call with raise_errors=False.  On an error,
the backend will call log.FatalError with the appropriate info.

Ideally, some day we can avoid the need for the raise_errors argument
and simply create an exception class that has enough information in it
for the decorator to call log.FatalError itself on the last try.  Then
change the backends to always raise that.  But that is a much more
invasive patch.

Anyway, you only need the argument if you are using @retry.

-mt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]