Catch AttributeError if regex is not found. (#30990)
This commit is contained in:
parent
0f39536c5c
commit
ba99e44b42
1 changed files with 5 additions and 2 deletions
|
@ -166,8 +166,11 @@ def create_apache_identifier(name):
|
|||
|
||||
for search, reexpr in re_workarounds:
|
||||
if search in name:
|
||||
try:
|
||||
rematch = re.search(reexpr, name)
|
||||
return rematch.group(1) + '_module'
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
return name + '_module'
|
||||
|
||||
|
|
Loading…
Reference in a new issue