Skip to content

Commit

Permalink
manubot#337 fix curie call timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
xihh87 committed Jun 29, 2022
1 parent 2acc3cf commit 172f148
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions manubot/cite/curie/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,15 @@ def __post_init__(self):
if "pattern" in self.resource:
self.accession_pattern = self.resource["pattern"]

def get_csl_item(self, citekey: CiteKey):
def get_csl_item(
self,
citekey: CiteKey,
timeout_seconds: typing.Union[tuple, int, float, None] = default_timeout,
):
from ..url import get_url_csl_item

url = self.get_url(accession=citekey.standard_accession)
return get_url_csl_item(url)
return get_url_csl_item(url, timeout_seconds=timeout_seconds)

def inspect(self, citekey: CiteKey) -> typing.Optional[str]:
pattern = self._get_pattern("accession_pattern")
Expand Down

0 comments on commit 172f148

Please sign in to comment.