From 2fc8b6442213806e6b5727151da49f66e69b92e8 Mon Sep 17 00:00:00 2001 From: Mathias Seidler Date: Sun, 23 Feb 2020 08:59:50 +0100 Subject: [PATCH] Fix flake8 basestring complaints. --- hyper/tls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyper/tls.py b/hyper/tls.py index 422b001c..39fa8e88 100644 --- a/hyper/tls.py +++ b/hyper/tls.py @@ -122,8 +122,8 @@ def init_context(cert_path=None, cert=None, cert_password=None): if cert is not None: try: - basestring - except NameError: + from builtins import basestring + except ImportError: basestring = (str, bytes) if not isinstance(cert, basestring): context.load_cert_chain(cert[0], cert[1], cert_password)