aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-03 14:25:52 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-03 16:46:07 -0700
commita7337a5a4a9ca2376b392161e1caf871914b9b13 (patch)
treec898c74090db0fefe12acab59d150a90a585e011
parent7cd0d97849f37d366a33c98204321c471fb6011c (diff)
downloadfatcat-a7337a5a4a9ca2376b392161e1caf871914b9b13.tar.gz
fatcat-a7337a5a4a9ca2376b392161e1caf871914b9b13.zip
pubmed harvester: explicit assertions to mark unreachable code paths
-rw-r--r--python/fatcat_tools/harvest/pubmed.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/fatcat_tools/harvest/pubmed.py b/python/fatcat_tools/harvest/pubmed.py
index 118580db..d904144b 100644
--- a/python/fatcat_tools/harvest/pubmed.py
+++ b/python/fatcat_tools/harvest/pubmed.py
@@ -314,6 +314,7 @@ def ftpretr(
time.sleep(retry_delay)
else:
return f.name
+ assert False, "Unreachable code branch"
def ftpretr_via_http_proxy(
@@ -348,6 +349,7 @@ def ftpretr_via_http_proxy(
if i + 1 == max_retries:
raise
time.sleep(retry_delay)
+ assert False, "Unreachable code branch"
def xmlstream(filename: str, tag: str, encoding: str = "utf-8") -> Generator[Any, Any, Any]: