diff options
Diffstat (limited to 'crawler.py')
-rw-r--r-- | crawler.py | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -20,7 +20,6 @@ # under the copyright of the software, unless explicitly stated otherwise. import os -import re import stat @@ -107,11 +106,9 @@ def crawl(paths, excludes=()): from path import pattern2re # convert excludes path_excludes = [ - re.compile(pattern2re(x)) - for x in excludes if not x.endswith('/')] + pattern2re(x) for x in excludes if not x.endswith('/')] dir_excludes = [ - re.compile(pattern2re(x.rstrip('/'))) - for x in excludes if x.endswith('/')] + pattern2re(x.rstrip('/')) for x in excludes if x.endswith('/')] # go over filesystem for path in paths: path = u'' + path |