Fix None find paths (#541).

This commit is contained in:
Dan Helfman 2022-06-03 15:20:05 -07:00
parent d14f22e121
commit 9aefb5179f
2 changed files with 4 additions and 2 deletions

View file

@ -92,6 +92,8 @@ def make_find_paths(find_paths):
['sh:**/*foo.txt*/**', 'pp:root/somedir'] ['sh:**/*foo.txt*/**', 'pp:root/somedir']
''' '''
if not find_paths:
return ()
return tuple( return tuple(
find_path find_path

View file

@ -258,8 +258,8 @@ def test_make_list_command_includes_additional_flags(argument_name):
assert command == ('borg', 'list', '--' + argument_name.replace('_', '-'), 'value', 'repo') assert command == ('borg', 'list', '--' + argument_name.replace('_', '-'), 'value', 'repo')
def test_make_find_paths_passes_through_empty_paths(): def test_make_find_paths_considers_none_as_empty_paths():
assert module.make_find_paths(()) == () assert module.make_find_paths(None) == ()
def test_make_find_paths_passes_through_patterns(): def test_make_find_paths_passes_through_patterns():