mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-06-08 08:11:33 +00:00
Merge remote-tracking branch 'tsimonq2/tsimonq2/rest-policy-urlerror'
This commit is contained in:
commit
3e18826a38
@ -4,7 +4,7 @@ import urllib.request
|
|||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from urllib.error import HTTPError
|
from urllib.error import HTTPError, URLError
|
||||||
|
|
||||||
|
|
||||||
LAUNCHPAD_URL = "https://api.launchpad.net/1.0/"
|
LAUNCHPAD_URL = "https://api.launchpad.net/1.0/"
|
||||||
@ -39,7 +39,7 @@ class Rest:
|
|||||||
% (url, 5 - retry - 1)
|
% (url, 5 - retry - 1)
|
||||||
)
|
)
|
||||||
exc = e
|
exc = e
|
||||||
except HTTPError as e:
|
except (HTTPError, URLError) as e:
|
||||||
if e.code not in (503, 502):
|
if e.code not in (503, 502):
|
||||||
raise
|
raise
|
||||||
self.logger.info(
|
self.logger.info(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user