def shutdown_abort():
 try:
  win32api.AbortSystemShutdown('127.0.0.1')
  return True
 except pywintypes.error as exc:
  (number, context, message) = exc
  log.error('Failed to abort system shutdown')
  log.error('nbr: {0}'.format(number))
  log.error('ctx: {0}'.format(context))
  log.error('msg: {0}'.format(message))
  return False

def shutdown_abort ( ) : try : win32api . AbortSystemShutdown ( '127.0.0.1' ) return True except pywintypes . error as exc : ( number , context , message ) = exc log . error ( 'Failed to abort system shutdown' ) log . error ( 'nbr: {0}' . format ( number ) ) log . error ( 'ctx: {0}' . format ( context ) ) log . error ( 'msg: {0}' . format ( message ) ) return False
abort a shutdown .