duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] Fwd: AssertionError on every attempt


From: Michael Terry
Subject: Re: [Duplicity-talk] Fwd: AssertionError on every attempt
Date: Mon, 15 Jun 2015 11:06:13 -0400

On 15 June 2015 at 10:48, <address@hidden> wrote:
On 15.06.2015 15:15, Bruce Merry wrote:
> On 10 June 2015 at 14:43, Rupert Levene <address@hidden> wrote:
>> > (4) deletion of a non-existing file will do nothing; I don't know what
>> > the old code would have done.
> I ran the manual backend test and the delete test currently fails on
> deleting a non-existent file, because it throws backend_error instead
> of backend_not_found. So assuming the test is testing what it is
> supposed to test, what should happen is to report backend_not_found if
> the file does not exist.

not sure that trying to delete non existing files warrants a fatal error, stopping a whole purge/cleanup routine.

pretty sure (like 80%) that most backends (regardless of the test you mention) implement a "@$*# it!" approach and simply continue.

The general backend code (in backend.py) uses that error case in a couple places (it will skip retries if it sees it, and will know to fill size information out correctly for the backend).

If a specific backend doesn't have _delete_list, backend.py iterates over the files on its behalf and calls _delete for each.  In that case, we should probably intercept not_found and ignore it.  But the exception can be useful as general informative signal to the backend code (rather than just having backends ignore it).

It also lets backends be dumber.  For example, the local backend can simply make a call like os.remove() call, let it throw the not found exception, and let error code conversion make it the ignorable not_found exception.

So I'm in favor of keeping it, and just patching backend.py to ignore the error when iterating during delete().

reply via email to

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