Refactor install

This commit is contained in:
twangboy 2016-03-21 17:59:28 -06:00
parent 7daf9d8277
commit 548604bce6

View File

@ -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)