mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
tools/import_layer: fix errors in maintainer scraping code
* Fix "sre_constants.error: nothing to repeat" error due to .* inside group made optional with ? in regex * Avoid error if maintainer responsibility is not specified Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
0ec1909051
commit
7a432108c0
|
@ -383,7 +383,7 @@ def main():
|
|||
layer.layer_type = 'A'
|
||||
|
||||
if maintainers:
|
||||
maint_re = re.compile(r'^"?([^"@$<>]+)"? *<([^<> ]+)>[ -]*(.*)?$')
|
||||
maint_re = re.compile(r'^"?([^"@$<>]+)"? *<([^<> ]+)>[ -]*(.+)?$')
|
||||
for maintentry in maintainers:
|
||||
res = maint_re.match(maintentry)
|
||||
if res:
|
||||
|
@ -391,7 +391,8 @@ def main():
|
|||
maintainer.layerbranch = layerbranch
|
||||
maintainer.name = res.group(1).strip()
|
||||
maintainer.email = res.group(2)
|
||||
maintainer.responsibility = res.group(3).strip()
|
||||
if res.group(3):
|
||||
maintainer.responsibility = res.group(3).strip()
|
||||
maintainer.save()
|
||||
|
||||
layer.save()
|
||||
|
|
Loading…
Reference in New Issue
Block a user