Skip to content

Commit

Permalink
Merge pull request #51438 from twangboy/fix_raise_2018.3.4
Browse files Browse the repository at this point in the history
Add missing raise statement
  • Loading branch information
dwoz committed Jan 30, 2019
2 parents 28b898c + 5830fad commit a880e42
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions salt/modules/panos.py
Expand Up @@ -1620,7 +1620,7 @@ def set_authentication_profile(profile=None, deploy=False):
'''

if not profile:
CommandExecutionError("Profile name option must not be none.")
raise CommandExecutionError("Profile name option must not be none.")

ret = {}

Expand Down Expand Up @@ -1657,7 +1657,7 @@ def set_hostname(hostname=None, deploy=False):
'''

if not hostname:
CommandExecutionError("Hostname option must not be none.")
raise CommandExecutionError("Hostname option must not be none.")

ret = {}

Expand Down Expand Up @@ -1697,7 +1697,7 @@ def set_management_icmp(enabled=True, deploy=False):
elif enabled is False:
value = "yes"
else:
CommandExecutionError("Invalid option provided for service enabled option.")
raise CommandExecutionError("Invalid option provided for service enabled option.")

ret = {}

Expand Down Expand Up @@ -1737,7 +1737,7 @@ def set_management_http(enabled=True, deploy=False):
elif enabled is False:
value = "yes"
else:
CommandExecutionError("Invalid option provided for service enabled option.")
raise CommandExecutionError("Invalid option provided for service enabled option.")

ret = {}

Expand Down Expand Up @@ -1777,7 +1777,7 @@ def set_management_https(enabled=True, deploy=False):
elif enabled is False:
value = "yes"
else:
CommandExecutionError("Invalid option provided for service enabled option.")
raise CommandExecutionError("Invalid option provided for service enabled option.")

ret = {}

Expand Down Expand Up @@ -1817,7 +1817,7 @@ def set_management_ocsp(enabled=True, deploy=False):
elif enabled is False:
value = "yes"
else:
CommandExecutionError("Invalid option provided for service enabled option.")
raise CommandExecutionError("Invalid option provided for service enabled option.")

ret = {}

Expand Down Expand Up @@ -1857,7 +1857,7 @@ def set_management_snmp(enabled=True, deploy=False):
elif enabled is False:
value = "yes"
else:
CommandExecutionError("Invalid option provided for service enabled option.")
raise CommandExecutionError("Invalid option provided for service enabled option.")

ret = {}

Expand Down Expand Up @@ -1897,7 +1897,7 @@ def set_management_ssh(enabled=True, deploy=False):
elif enabled is False:
value = "yes"
else:
CommandExecutionError("Invalid option provided for service enabled option.")
raise CommandExecutionError("Invalid option provided for service enabled option.")

ret = {}

Expand Down Expand Up @@ -1937,7 +1937,7 @@ def set_management_telnet(enabled=True, deploy=False):
elif enabled is False:
value = "yes"
else:
CommandExecutionError("Invalid option provided for service enabled option.")
raise CommandExecutionError("Invalid option provided for service enabled option.")

ret = {}

Expand Down Expand Up @@ -2130,7 +2130,7 @@ def set_permitted_ip(address=None, deploy=False):
'''

if not address:
CommandExecutionError("Address option must not be empty.")
raise CommandExecutionError("Address option must not be empty.")

ret = {}

Expand Down Expand Up @@ -2166,7 +2166,7 @@ def set_timezone(tz=None, deploy=False):
'''

if not tz:
CommandExecutionError("Timezone name option must not be none.")
raise CommandExecutionError("Timezone name option must not be none.")

ret = {}

Expand Down
2 changes: 1 addition & 1 deletion salt/modules/win_dsc.py
Expand Up @@ -739,7 +739,7 @@ def set_lcm_config(config_mode=None,
cmd += ' RefreshFrequencyMins = {0};'.format(refresh_freq)
if reboot_if_needed is not None:
if not isinstance(reboot_if_needed, bool):
SaltInvocationError('reboot_if_needed must be a boolean value')
raise SaltInvocationError('reboot_if_needed must be a boolean value')
if reboot_if_needed:
reboot_if_needed = '$true'
else:
Expand Down

0 comments on commit a880e42

Please sign in to comment.