From ab76176553047d101a14c1ed92eba664044100c1 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 19 Sep 2015 18:38:44 +0200 Subject: [PATCH] fix: patterns might be None --- borg/archiver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/borg/archiver.py b/borg/archiver.py index 75b6e72b6..28f1d8a3f 100644 --- a/borg/archiver.py +++ b/borg/archiver.py @@ -286,7 +286,7 @@ Type "Yes I am sure" if you understand this and want to continue.\n""") if not args.dry_run: while dirs: archive.extract_item(dirs.pop(-1)) - for pattern in patterns: + for pattern in (patterns or []): if isinstance(pattern, IncludePattern) and pattern.match_count == 0: self.print_error("Warning: Include pattern '%s' never matched.", pattern) return self.exit_code