]> arthur.barton.de Git - bup.git/commit
Remove MetadataError and make apply error handling finer-grained.
authorRob Browning <rlb@defaultvalue.org>
Wed, 19 Jan 2011 00:28:51 +0000 (18:28 -0600)
committerRob Browning <rlb@defaultvalue.org>
Wed, 19 Jan 2011 00:28:51 +0000 (18:28 -0600)
commit54482579bf7344a373bf79ef8bda55256ef3b65a
treebc2c333c3f8e9189d756609a93ab86ecea80c440
parent1b653d8d9f9b483496cb210e85700cffac98cbe4
Remove MetadataError and make apply error handling finer-grained.

Handle errors that were handled by a blanket MetadataApplyError catch
more selectively.  Rename MetadataApplyError to ApplyError.  Throw an
ApplyError when encountering EACCES in order to skip the (bad) path.
Call add_error() for lchown EPERM.  Allow other exceptions to pass
through.

Catch ApplyError when calling apply_to_path() from extract() and
finish_extract() and redirect the exception to add_error() --
i.e. skip the path.

Add bup.helpers.clear_errors(), and use it in test cases that involve
calls to add_error().
lib/bup/helpers.py
lib/bup/metadata.py
lib/bup/t/tmetadata.py