From d1268743830faa7b254d792faeee8aaf30618335 Mon Sep 17 00:00:00 2001 From: John Kurkowski Date: Fri, 23 Oct 2020 16:39:01 -0700 Subject: [PATCH] Remove obsolete IOError alias Aliased since Python 3.3. --- tldextract/cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tldextract/cache.py b/tldextract/cache.py index 3ffb77e5..18ae23db 100644 --- a/tldextract/cache.py +++ b/tldextract/cache.py @@ -39,7 +39,7 @@ def get(self, namespace, key): try: with open(cache_filepath) as cache_file: return json.load(cache_file) - except (IOError, ValueError) as exc: + except (OSError, ValueError) as exc: LOG.error( "error reading TLD cache file %s: %s", cache_filepath, @@ -56,7 +56,7 @@ def set(self, namespace, key, value): try: with open(cache_filepath, 'w') as cache_file: json.dump(value, cache_file) - except IOError as ioe: + except OSError as ioe: LOG.warning( ( "unable to cache %s.%s in %s. This could refresh the "