mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
don't need to check venv, raise cmdexecutionerrors in virtualenv mod
This commit is contained in:
parent
c558748b5f
commit
04873c9da7
@ -342,12 +342,10 @@ def get_resource_path(venv, package_or_requirement, resource_name):
|
||||
|
||||
salt '*' virtualenv.get_resource_path /path/to/my/venv my_package my/resource.xml
|
||||
'''
|
||||
if not salt.utils.verify.safe_py_code(venv):
|
||||
return ''
|
||||
if not salt.utils.verify.safe_py_code(package_or_requirement):
|
||||
return ''
|
||||
raise salt.exceptions.CommandExecutionError
|
||||
if not salt.utils.verify.safe_py_code(resource_name):
|
||||
return ''
|
||||
raise salt.exceptions.CommandExecutionError
|
||||
bin_path = os.path.join(venv, 'bin/python')
|
||||
|
||||
if not os.path.exists(bin_path):
|
||||
@ -366,12 +364,10 @@ def get_resource_content(venv, package_or_requirement, resource_name):
|
||||
|
||||
salt '*' virtualenv.get_resource_content /path/to/my/venv my_package my/resource.xml
|
||||
'''
|
||||
if not salt.utils.verify.safe_py_code(venv):
|
||||
return ''
|
||||
if not salt.utils.verify.safe_py_code(package_or_requirement):
|
||||
return ''
|
||||
raise salt.exceptions.CommandExecutionError
|
||||
if not salt.utils.verify.safe_py_code(resource_name):
|
||||
return ''
|
||||
raise salt.exceptions.CommandExecutionError
|
||||
bin_path = os.path.join(venv, 'bin/python')
|
||||
|
||||
if not os.path.exists(bin_path):
|
||||
|
Loading…
Reference in New Issue
Block a user