From a9a50cfd744e96f5875701d10e3a1a0ae6d4b8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Such=C3=A1nek?= Date: Wed, 19 Jan 2022 15:21:16 +0100 Subject: [PATCH] Add default timeout for POST --- nanopub_submitter/nanopub.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nanopub_submitter/nanopub.py b/nanopub_submitter/nanopub.py index e879979..0f357f3 100644 --- a/nanopub_submitter/nanopub.py +++ b/nanopub_submitter/nanopub.py @@ -126,7 +126,8 @@ def _publish_nanopub(nanopub_bundle: str, ctx: NanopubProcessingContext) -> list headers={ 'Content-Type': f'application/trig; charset={DEFAULT_ENCODING}', 'User-Agent': f'{PACKAGE_NAME}/{PACKAGE_VERSION}', - } + }, + timeout=10, ) if not r.ok: ok = False