mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Simplify package matching
This commit is contained in:
parent
60a6fa0df2
commit
319c6e655a
1 changed files with 2 additions and 4 deletions
|
@ -13,11 +13,9 @@ class AddManifestPackages(Task):
|
||||||
import re
|
import re
|
||||||
remote = re.compile('^(?P<name>[^/]+)(/(?P<target>[^/]+))?$')
|
remote = re.compile('^(?P<name>[^/]+)(/(?P<target>[^/]+))?$')
|
||||||
for package in info.manifest.packages['install']:
|
for package in info.manifest.packages['install']:
|
||||||
match = None
|
match = remote.match(package)
|
||||||
if remote.match(package):
|
|
||||||
match = remote.match(package).groupdict()
|
|
||||||
if match is not None:
|
if match is not None:
|
||||||
info.packages.add(match['name'], match['target'])
|
info.packages.add(match.group('name'), match.group('target'))
|
||||||
else:
|
else:
|
||||||
info.packages.add_local(package)
|
info.packages.add_local(package)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue