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
1=== modified file 'README'
2--- README 2017-07-11 14:55:38 +0000
3+++ README 2018-10-07 12:22:00 +0000
4@@ -19,7 +19,7 @@
5
6 REQUIREMENTS:
7
8- * Python v2.7 or later
9+ * Python v2.7
10 * librsync v0.9.6 or later
11 * GnuPG for encryption
12 * fasteners 0.14.1 or later for concurrency locking
13
14=== modified file 'duplicity/selection.py'
15--- duplicity/selection.py 2018-07-18 21:21:24 +0000
16+++ duplicity/selection.py 2018-10-07 12:22:00 +0000
17@@ -43,11 +43,6 @@
18 """
19
20
21-class SelectError(Exception):
22- u"""Some error dealing with the Select class"""
23- pass
24-
25-
26 class Select:
27 u"""Iterate appropriate Paths in given directory
28
29@@ -281,7 +276,7 @@
30 self.add_selection_func(self.regexp_get_sf(arg, 1))
31 else:
32 assert 0, u"Bad selection option %s" % opt
33- except SelectError as e:
34+ except GlobbingError as e:
35 self.parse_catch_error(e)
36 assert filelists_index == len(filelists)
37 self.parse_last_excludes()
38@@ -508,8 +503,7 @@
39 file_prefix_selection = select_fn_from_glob(glob_str, include=1)(self.rootpath)
40 if not file_prefix_selection:
41 # file_prefix_selection == 1 (include) or 2 (scan)
42- raise FilePrefixError(glob_str + u" glob with " + self.rootpath.uc_name
43- + u" path gives " + unicode(file_prefix_selection))
44+ raise FilePrefixError(glob_str)
45
46 return select_fn_from_glob(glob_str, include, ignore_case)
47

Subscribers

People subscribed via source and target branches