]> arthur.barton.de Git - bup.git/commit
Defer metadata aquisition and application errors during create/extract.
authorRob Browning <rlb@defaultvalue.org>
Sat, 9 Oct 2010 16:45:31 +0000 (11:45 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 9 Oct 2010 16:45:31 +0000 (11:45 -0500)
commitc20001cec385d42a228a32f2248c377d7474846a
treed6bcff7e7a47438f23a431500b32b1f6d6732474
parent23d642ad0fd790b94d89784583b3ad9e369d80e3
Defer metadata aquisition and application errors during create/extract.

Add MetadataAcquisitionError and MetadataApplicationError.  Throw
MetadataAcquisitionError whenever an attempt to read a path's metadata
fails, and throw MetadataApplicationError whenever an attempt to apply
metadata to a path fails.

Catch and convert these two exceptions to add_error() calls in
Metadata.apply_to_path() and metadata.from_path().  That will defer
them during "bup meta --create" and "bup meta --extract".

Add simple initial tests for the new exceptions.
cmd/meta-cmd.py
lib/bup/metadata.py
lib/bup/t/tmetadata.py