← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files into lp:duplicity/0.7-series

 

Aaron Whitehouse has proposed merging lp:~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files into lp:duplicity/0.7-series.

Commit message:
Revert log.Error to log.Warn, as it was prior to the merge in rev 1224, as this was affecting other applications (e.g. deja dup; Bug #1605939).

Requested reviews:
  duplicity-team (duplicity-team)
Related bugs:
  Bug #1605939 in Duplicity: "Error on locked files causing deja-dup "Backup Failed""
  https://bugs.launchpad.net/duplicity/+bug/1605939

For more details, see:
https://code.launchpad.net/~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files/+merge/300981

Revert log.Error to log.Warn, as it was prior to the merge in rev 1224, as this was affecting other applications (e.g. deja dup; Bug #1605939).

This means that if the user, for example, asks duplicity to back up /etc/ and some files are locked, it will give only "Warn" rather than "Error" log entries. 

This approach is not perfect, as from duplicity's perspective, it did really fail and the proper way to deal with the locked files at the command line is arguably to add an exception not to back up the files that you don't have access to read. That isn't easily done in deja dup, however, as that only allows directories to be excluded through the GUI.

Also, this was a change of behaviour from earlier versions (which "Warn"ed rather than "Error"ing), which counts for "Warn" unless there is a good reason to change it.
-- 
Your team duplicity-team is requested to review the proposed merge of lp:~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files into lp:duplicity/0.7-series.
=== modified file 'duplicity/selection.py'
--- duplicity/selection.py	2016-06-12 21:08:11 +0000
+++ duplicity/selection.py	2016-07-24 00:19:58 +0000
@@ -149,10 +149,10 @@
                             (s == 1 or s == 2):
                         # Path is a file or folder that cannot be read, but
                         # should be included or scanned.
-                        log.Error(_("Error accessing possibly locked file %s") %
-                                  util.ufn(new_path.name),
-                                  log.WarningCode.cannot_read,
-                                  util.escape(new_path.name))
+                        log.Warn(_("Error accessing possibly locked file %s") %
+                                 util.ufn(new_path.name),
+                                 log.WarningCode.cannot_read,
+                                 util.escape(new_path.name))
                         if diffdir.stats:
                             diffdir.stats.Errors += 1
                     elif s == 1:


Follow ups