Browse Source

patterns: explicate translate source

Marian Beermann 8 years ago
parent
commit
c5e3232187
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/borg/patterns.py

+ 2 - 2
src/borg/patterns.py

@@ -1,11 +1,11 @@
 import argparse
+import fnmatch
 import os.path
 import re
 import sys
 import unicodedata
 from collections import namedtuple
 from enum import Enum
-from fnmatch import translate
 
 from . import shellpattern
 from .helpers import clean_lines
@@ -258,7 +258,7 @@ class FnmatchPattern(PatternBase):
 
         # fnmatch and re.match both cache compiled regular expressions.
         # Nevertheless, this is about 10 times faster.
-        self.regex = re.compile(translate(self.pattern))
+        self.regex = re.compile(fnmatch.translate(self.pattern))
 
     def _match(self, path):
         return (self.regex.match(path + os.path.sep) is not None)