mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Catch AttributeError if regex is not found. (#30990)
This commit is contained in:
@@ -166,8 +166,11 @@ def create_apache_identifier(name):
|
||||
|
||||
for search, reexpr in re_workarounds:
|
||||
if search in name:
|
||||
rematch = re.search(reexpr, name)
|
||||
return rematch.group(1) + '_module'
|
||||
try:
|
||||
rematch = re.search(reexpr, name)
|
||||
return rematch.group(1) + '_module'
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
return name + '_module'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user