Merge lp:~qsantos/duplicity/fix-unmatched-rule-error into lp:~duplicity-team/duplicity/0.8-series

Proposed by qsantos
Status: Merged
Merge reported by: Kenneth Loafman
Merged at revision: not available
Proposed branch: lp:~qsantos/duplicity/fix-unmatched-rule-error
Merge into: lp:~duplicity-team/duplicity/0.8-series
Diff against target: 46 lines (+3/-9)
2 files modified
README (+1/-1)
duplicity/selection.py (+2/-8)
To merge this branch: bzr merge lp:~qsantos/duplicity/fix-unmatched-rule-error
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+356227@code.launchpad.net

Description of the change

There are actually two commits: the first fixes a very minor detail in the README regarding the Python version that should be used; the second fixes the way exceptions are handled when an incorrect rule is specified, and display the nice error message rather than an obscure stack trace.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2017-07-11 14:55:38 +0000
+++ README 2018-10-07 12:22:00 +0000
@@ -19,7 +19,7 @@
1919
20REQUIREMENTS:20REQUIREMENTS:
2121
22 * Python v2.7 or later22 * Python v2.7
23 * librsync v0.9.6 or later23 * librsync v0.9.6 or later
24 * GnuPG for encryption24 * GnuPG for encryption
25 * fasteners 0.14.1 or later for concurrency locking25 * fasteners 0.14.1 or later for concurrency locking
2626
=== modified file 'duplicity/selection.py'
--- duplicity/selection.py 2018-07-18 21:21:24 +0000
+++ duplicity/selection.py 2018-10-07 12:22:00 +0000
@@ -43,11 +43,6 @@
43"""43"""
4444
4545
46class SelectError(Exception):
47 u"""Some error dealing with the Select class"""
48 pass
49
50
51class Select:46class Select:
52 u"""Iterate appropriate Paths in given directory47 u"""Iterate appropriate Paths in given directory
5348
@@ -281,7 +276,7 @@
281 self.add_selection_func(self.regexp_get_sf(arg, 1))276 self.add_selection_func(self.regexp_get_sf(arg, 1))
282 else:277 else:
283 assert 0, u"Bad selection option %s" % opt278 assert 0, u"Bad selection option %s" % opt
284 except SelectError as e:279 except GlobbingError as e:
285 self.parse_catch_error(e)280 self.parse_catch_error(e)
286 assert filelists_index == len(filelists)281 assert filelists_index == len(filelists)
287 self.parse_last_excludes()282 self.parse_last_excludes()
@@ -508,8 +503,7 @@
508 file_prefix_selection = select_fn_from_glob(glob_str, include=1)(self.rootpath)503 file_prefix_selection = select_fn_from_glob(glob_str, include=1)(self.rootpath)
509 if not file_prefix_selection:504 if not file_prefix_selection:
510 # file_prefix_selection == 1 (include) or 2 (scan)505 # file_prefix_selection == 1 (include) or 2 (scan)
511 raise FilePrefixError(glob_str + u" glob with " + self.rootpath.uc_name506 raise FilePrefixError(glob_str)
512 + u" path gives " + unicode(file_prefix_selection))
513507
514 return select_fn_from_glob(glob_str, include, ignore_case)508 return select_fn_from_glob(glob_str, include, ignore_case)
515509

Subscribers

People subscribed via source and target branches