oeqa/core/loader: fix regex to include numbers

The previous version only included the numbers 1 and 2 in the allowed characters
for the module name. In the past, this was (\w+) so all numbers were allowed.
Now it explicitly includes all numbers again.

(From OE-Core rev: f241fa493536ac953c1dac303917c6e75b459e28)

Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Vacek, Patrick
2020-07-06 10:34:46 +00:00
committed by Richard Purdie
parent d743f37941
commit 6474ff808b

View File

@@ -46,7 +46,7 @@ def _built_modules_dict(modules):
for module in modules:
# Assumption: package and module names do not contain upper case
# characters, whereas class names do
m = re.match(r'^([1-2a-z_.]+)(?:\.(\w[^.]*)(?:\.([^.]+))?)?$', module, flags=re.ASCII)
m = re.match(r'^([0-9a-z_.]+)(?:\.(\w[^.]*)(?:\.([^.]+))?)?$', module, flags=re.ASCII)
if not m:
continue