Given that there's a difference between how a crash and a reported win32 error is handled, it might be better to not set SERVICE_STOPPED when an unhandled python exception occurs. That way it can be treated as a crash. Otherwise, if the service method returns an error code, still set SERVICE_STOPPED and report the error using ERROR_SERVICE_SPECIFIC_ERROR.