mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +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
|
||||
remote = re.compile('^(?P<name>[^/]+)(/(?P<target>[^/]+))?$')
|
||||
for package in info.manifest.packages['install']:
|
||||
match = None
|
||||
if remote.match(package):
|
||||
match = remote.match(package).groupdict()
|
||||
match = remote.match(package)
|
||||
if match is not None:
|
||||
info.packages.add(match['name'], match['target'])
|
||||
info.packages.add(match.group('name'), match.group('target'))
|
||||
else:
|
||||
info.packages.add_local(package)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue