snap_config: set a timeout when talking to snapd (#9218)

This commit is contained in:
alexzorin
2022-02-28 11:16:58 -08:00
committed by GitHub
parent 37e4f5735a
commit 3c9e690e19
+2 -1
View File
@@ -54,7 +54,8 @@ def prepare_env(cli_args: List[str]) -> List[str]:
session.mount('http://snapd/', _SnapdAdapter())
try:
response = session.get('http://snapd/v2/connections?snap=certbot&interface=content')
response = session.get('http://snapd/v2/connections?snap=certbot&interface=content',
timeout=30.0)
response.raise_for_status()
except RequestException as e:
if isinstance(e, HTTPError) and e.response.status_code == 404: