win_system: return False from a skipped reboot

...and clarify what success represents.
This commit is contained in:
Morgan Willcock 2017-02-10 14:26:08 +00:00 committed by GitHub
parent 6a9704189f
commit dcb4d05275

View File

@ -173,7 +173,7 @@ def reboot(timeout=5, in_seconds=False, wait_for_reboot=False, # pylint: disabl
state intended to be executed
at the end of a state run (using *order: last*).
:return: True if successful
:return: True if successful (a reboot will occur)
:rtype: bool
CLI Example:
@ -263,7 +263,7 @@ def shutdown(message=None, timeout=5, force_close=True, reboot=False, # pylint:
timeout = _convert_minutes_seconds(timeout, in_seconds)
if only_on_pending_reboot and not get_pending_reboot():
return True
return False
if message and not isinstance(message, str):
message = message.decode('utf-8')