Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support to patterns like *.swp in .dojoignore

  • Loading branch information...
commit deb4a45aa32a118ffe22bc666287b2e20ec5bf59 1 parent 517eb28
Flávio Amieiro authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 dojotools.py
8 dojotools.py
View
@@ -86,7 +86,10 @@ def _get_patterns(self, patterns_file):
"""
try:
with open(patterns_file, 'r') as f:
- patterns = [p.strip() for p in f.readlines()]
+ patterns = [
+ p.strip().replace('*.', '.*\.')
+ for p in f.readlines()
+ ]
except IOError:
sys.stdout.write(
'Could not find %s. Patterns will not be ignored\n'
@@ -186,7 +189,8 @@ def parse_options():
help = (
'Defines the file with patterns to ignore. '
'Make sure the patterns in the file are valid '
- 'python regular expressions.'
+ 'python regular expressions. '
+ 'Patterns like *.ext are also accepted.'
),
metavar = 'PATTERNS_FILE',
default = None,
Please sign in to comment.
Something went wrong with that request. Please try again.