Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/crawler.py
diff options
context:
space:
mode:
Diffstat (limited to 'crawler.py')
-rw-r--r--crawler.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/crawler.py b/crawler.py
index 82f160f..4305b26 100644
--- a/crawler.py
+++ b/crawler.py
@@ -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