mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-09-30 03:11:29 +02:00
Regular expression handling now throws an error on an invalid regex.
Previously, it was giving of an incomprehensible error from the "re" module in Python.
This commit is contained in:
parent
dcb4cedf27
commit
bfdac450c4
@ -41,9 +41,12 @@ def set_filtered(file_name):
|
|||||||
|
|
||||||
if len(string) > 0:
|
if len(string) > 0:
|
||||||
for i in __filters__:
|
for i in __filters__:
|
||||||
if re.search(i, string) != None:
|
try:
|
||||||
__filtered_files__.add(string)
|
if re.search(i, string) != None:
|
||||||
return True
|
__filtered_files__.add(string)
|
||||||
|
return True
|
||||||
|
except:
|
||||||
|
raise ValueError("Invalid regular expression specified")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
__filtering_info_text__ = _("The following files were excluded from the statistics due to the "
|
__filtering_info_text__ = _("The following files were excluded from the statistics due to the "
|
||||||
|
Loading…
Reference in New Issue
Block a user