diff options
author | Martin Hostettler <textshell@uchuujin.de> | 2016-08-22 23:07:38 +0200 |
---|---|---|
committer | Martin Hostettler <textshell@uchuujin.de> | 2016-08-22 23:07:38 +0200 |
commit | a026febdb03e8beaa8c267de9cfbea46aec28a45 (patch) | |
tree | f740a8883594007f40d785918e7fe0440be3b34d /src | |
parent | 972392e290e3e38beef32ce455154312452e7869 (diff) |
Archiver.build_filter: strip_components is no longer a optional parameter.
Diffstat (limited to 'src')
-rw-r--r-- | src/borg/archiver.py | 2 | ||||
-rw-r--r-- | src/borg/testsuite/archiver.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/borg/archiver.py b/src/borg/archiver.py index b712d2a8e..d3a8f76d7 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -417,7 +417,7 @@ class Archiver: self.print_file_status(status, path) @staticmethod - def build_filter(matcher, peek_and_store_hardlink_masters, strip_components=0): + def build_filter(matcher, peek_and_store_hardlink_masters, strip_components): if strip_components: def item_filter(item): peek_and_store_hardlink_masters(item) diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 9d68e3eea..34a8acb35 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -2210,14 +2210,14 @@ class TestBuildFilter: def test_basic(self): matcher = PatternMatcher() matcher.add([parse_pattern('included')], True) - filter = Archiver.build_filter(matcher, self.item_is_hardlink_master) + filter = Archiver.build_filter(matcher, self.item_is_hardlink_master, 0) assert filter(Item(path='included')) assert filter(Item(path='included/file')) assert not filter(Item(path='something else')) def test_empty(self): matcher = PatternMatcher(fallback=True) - filter = Archiver.build_filter(matcher, self.item_is_hardlink_master) + filter = Archiver.build_filter(matcher, self.item_is_hardlink_master, 0) assert filter(Item(path='anything')) def test_strip_components(self): |