From 93f4b09d419d1d504c0be1bb3c8edb4b79112bbd Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Sun, 3 Jul 2016 23:58:12 +0200 Subject: [PATCH] BackupOSError documentation --- borg/archive.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/borg/archive.py b/borg/archive.py index 4804df154..ab4ddb0d9 100644 --- a/borg/archive.py +++ b/borg/archive.py @@ -47,7 +47,15 @@ flags_noatime = flags_normal | getattr(os, 'O_NOATIME', 0) class BackupOSError(Exception): - """Wrapper for OSError raised while accessing input files.""" + """ + Wrapper for OSError raised while accessing backup files. + + Borg does different kinds of IO, and IO failures have different consequences. + This wrapper represents failures of input file or extraction IO. + These are non-critical and are only reported (exit code = 1, warning). + + Any unwrapped IO error is critical and aborts execution (for example repository IO failure). + """ def __init__(self, os_error): self.os_error = os_error self.errno = os_error.errno @@ -414,7 +422,7 @@ Number of files: {0.stats.nfiles}'''.format( def restore_attrs(self, path, item, symlink=False, fd=None): """ - Restore filesystem attributes on *path* from *item* (*fd*). + Restore filesystem attributes on *path* (*fd*) from *item*. Does not access the repository. """