mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-12-22 13:42:14 +01: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
1 changed files with 6 additions and 3 deletions
|
@ -41,9 +41,12 @@ def set_filtered(file_name):
|
|||
|
||||
if len(string) > 0:
|
||||
for i in __filters__:
|
||||
if re.search(i, string) != None:
|
||||
__filtered_files__.add(string)
|
||||
return True
|
||||
try:
|
||||
if re.search(i, string) != None:
|
||||
__filtered_files__.add(string)
|
||||
return True
|
||||
except:
|
||||
raise ValueError("Invalid regular expression specified")
|
||||
return False
|
||||
|
||||
__filtering_info_text__ = _("The following files were excluded from the statistics due to the "
|
||||
|
|
Loading…
Reference in a new issue