From 28c06ec49951386a2e1831e058a839346bddb024 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Wed, 22 Nov 2023 12:13:46 -0500 Subject: [PATCH] 21146: Clean arvados.events imports Arvados-DCO-1.1-Signed-off-by: Brett Smith --- sdk/python/arvados/events.py | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/sdk/python/arvados/events.py b/sdk/python/arvados/events.py index e53e4980a8..2c5e33c2e5 100644 --- a/sdk/python/arvados/events.py +++ b/sdk/python/arvados/events.py @@ -2,32 +2,27 @@ # # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import -from future import standard_library -standard_library.install_aliases() -from builtins import str -from builtins import object -import arvados -from . import config -from . import errors -from .retry import RetryLoop - -import logging import json -import _thread -import threading -import time +import logging import os import re import ssl +import _thread +import threading +import time + +from . import config +from . import errors +from . import util +from .retry import RetryLoop + from ws4py.client.threadedclient import WebSocketClient _logger = logging.getLogger('arvados.events') - class _EventClient(WebSocketClient): def __init__(self, url, filters, on_event, last_log_id, on_closed): - ssl_options = {'ca_certs': arvados.util.ca_certs_path()} + ssl_options = {'ca_certs': util.ca_certs_path()} if config.flag_is_true('ARVADOS_API_HOST_INSECURE'): ssl_options['cert_reqs'] = ssl.CERT_NONE else: -- 2.30.2