mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Refactor install
This commit is contained in:
parent
7daf9d8277
commit
548604bce6
@ -102,12 +102,12 @@ def install(source, package_id):
|
||||
return True
|
||||
|
||||
uri = urllib.parse.urlparse(source)
|
||||
if uri.scheme == '':
|
||||
_install_from_path(source)
|
||||
else:
|
||||
if not uri.scheme == '':
|
||||
msg = 'Unsupported scheme for source uri: {0}'.format(uri.scheme)
|
||||
raise SaltInvocationError(msg)
|
||||
|
||||
_install_from_path(source)
|
||||
|
||||
return is_installed(package_id)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user