handle case where ignore patterns not defined

This commit is contained in:
Alan Hamlett 2013-10-28 18:06:19 -07:00
parent 8244e3eb81
commit 01b77db70e

View file

@ -140,8 +140,7 @@ def parseArguments(argv):
def should_ignore(fileName, patterns):
if not patterns:
patterns = []
try:
for pattern in patterns:
try:
compiled = re.compile(pattern, re.IGNORECASE)
@ -149,6 +148,8 @@ def should_ignore(fileName, patterns):
return pattern
except re.error as ex:
log.warning('Regex error (%s) for ignore pattern: %s' % (str(ex), pattern))
except TypeError:
pass
return False