mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
handle case where ignore patterns not defined
This commit is contained in:
parent
d34432217f
commit
a13e11d24d
@ -140,6 +140,7 @@ def parseArguments(argv):
|
|||||||
|
|
||||||
|
|
||||||
def should_ignore(fileName, patterns):
|
def should_ignore(fileName, patterns):
|
||||||
|
try:
|
||||||
for pattern in patterns:
|
for pattern in patterns:
|
||||||
try:
|
try:
|
||||||
compiled = re.compile(pattern, re.IGNORECASE)
|
compiled = re.compile(pattern, re.IGNORECASE)
|
||||||
@ -147,6 +148,8 @@ def should_ignore(fileName, patterns):
|
|||||||
return pattern
|
return pattern
|
||||||
except re.error as ex:
|
except re.error as ex:
|
||||||
log.warning('Regex error (%s) for ignore pattern: %s' % (str(ex), pattern))
|
log.warning('Regex error (%s) for ignore pattern: %s' % (str(ex), pattern))
|
||||||
|
except TypeError:
|
||||||
|
pass
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user