Explorar o código

fix: patterns might be None

Thomas Waldmann %!s(int64=9) %!d(string=hai) anos
pai
achega
ab76176553
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      borg/archiver.py

+ 1 - 1
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