Remove fail-safe mechanism
As [1] got merged, we can remove the mechanism for trying the old guidelines location in case of 404 response code. [1] https://review.opendev.org/c/osf/interop/+/786116 Change-Id: Ib9f083d1f1a713b3fa26c5daca781fedfa4923fc
This commit is contained in:
parent
81928c2e10
commit
6b3de7ab6d
|
@ -77,19 +77,6 @@ class Guidelines:
|
|||
for src_url in self.guideline_sources:
|
||||
try:
|
||||
resp = requests.get(src_url)
|
||||
# The following if-statement enables a transition period for
|
||||
# moving the guidelines to a new location by
|
||||
# https://review.opendev.org/c/osf/interop/+/786116
|
||||
# TODO(kopecmartin) remove this if-statement after the review
|
||||
# is merged.
|
||||
if resp.status_code == 404:
|
||||
if src_url == CONF.api.additional_capability_urls:
|
||||
src_url = 'https://opendev.org/api/v1/repos/osf/'
|
||||
src_url += 'interop/contents/add-ons'
|
||||
elif src_url == CONF.api.opendev_api_capabilities_url:
|
||||
src_url = 'https://opendev.org/api/v1/repos/osf/'
|
||||
src_url += 'interop/contents'
|
||||
resp = requests.get(src_url)
|
||||
|
||||
LOG.debug("Response Status: %s / Used Requests Cache: %s" %
|
||||
(resp.status_code,
|
||||
|
|
Loading…
Reference in New Issue