mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Remove try/except
This commit is contained in:
parent
06bd9d1dfc
commit
75126a7228
1 changed files with 10 additions and 8 deletions
|
@ -46,17 +46,19 @@ def test_bootstrap(chocolatey, clean):
|
|||
# if the test fails
|
||||
result = chocolatey.bootstrap()
|
||||
# Let's run it outside the try/except to see what the error is
|
||||
try:
|
||||
chocolatey_version = chocolatey.chocolatey_version(refresh=True)
|
||||
except CommandExecutionError:
|
||||
chocolatey_version = None
|
||||
chocolatey_version = chocolatey.chocolatey_version(refresh=True)
|
||||
# try:
|
||||
# chocolatey_version = chocolatey.chocolatey_version(refresh=True)
|
||||
# except CommandExecutionError:
|
||||
# chocolatey_version = None
|
||||
assert chocolatey_version is not None
|
||||
|
||||
|
||||
def test_bootstrap_version(chocolatey, clean):
|
||||
chocolatey.bootstrap(version="1.4.0")
|
||||
try:
|
||||
chocolatey_version = chocolatey.chocolatey_version(refresh=True)
|
||||
except CommandExecutionError:
|
||||
chocolatey_version = None
|
||||
chocolatey_version = chocolatey.chocolatey_version(refresh=True)
|
||||
# try:
|
||||
# chocolatey_version = chocolatey.chocolatey_version(refresh=True)
|
||||
# except CommandExecutionError:
|
||||
# chocolatey_version = None
|
||||
assert chocolatey_version == "1.4.0"
|
||||
|
|
Loading…
Add table
Reference in a new issue