Merge pull request #44295 from HeinleinSupport/issue44272

fixes issue #44272
This commit is contained in:
Nicole Thomas 2017-10-27 10:28:57 -04:00 committed by GitHub
commit bebc33daf5

View File

@ -444,8 +444,9 @@ def stop(name):
try: try:
win32serviceutil.StopService(name) win32serviceutil.StopService(name)
except pywintypes.error as exc: except pywintypes.error as exc:
raise CommandExecutionError( if exc[0] != 1062:
'Failed To Stop {0}: {1}'.format(name, exc[2])) raise CommandExecutionError(
'Failed To Stop {0}: {1}'.format(name, exc[2]))
attempts = 0 attempts = 0
while info(name)['Status'] in ['Running', 'Stop Pending'] \ while info(name)['Status'] in ['Running', 'Stop Pending'] \