summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/search.py
diff options
context:
space:
mode:
authorChristian Clauss <cclauss@me.com>2021-02-09 17:44:04 +0100
committerbnewbold <bnewbold@robocracy.org>2021-02-23 15:19:48 -0800
commit537659325664b47b01c24e82cb4a0e850cd129c0 (patch)
treebb7c93162d9f586a8bec17608cf7eceb11d47cf0 /fatcat_scholar/search.py
parent5878aa63118388361f353ca4f2f6c49a14a58b56 (diff)
downloadfatcat-scholar-537659325664b47b01c24e82cb4a0e850cd129c0.tar.gz
fatcat-scholar-537659325664b47b01c24e82cb4a0e850cd129c0.zip
Modernize Python syntax with pyupgrade --py38-plus **/*.py
Diffstat (limited to 'fatcat_scholar/search.py')
-rw-r--r--fatcat_scholar/search.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/fatcat_scholar/search.py b/fatcat_scholar/search.py
index c75ccdb..5b45ba9 100644
--- a/fatcat_scholar/search.py
+++ b/fatcat_scholar/search.py
@@ -386,8 +386,8 @@ def do_fulltext_search(
raise ValueError(str(e.info)) from e
except elasticsearch.exceptions.TransportError as e:
# all other errors
- logging.warn("elasticsearch non-200 status code: {}".format(e.info))
- raise IOError(str(e.info)) from e
+ logging.warn(f"elasticsearch non-200 status code: {e.info}")
+ raise OSError(str(e.info)) from e
query_delta = datetime.datetime.now() - query_start
# convert from API objects to dicts