Make the container cleaner endless loop against login proxy without auth

This commit is contained in:
Stephan Kulow 2021-10-29 15:26:33 +02:00
parent c711dd5772
commit b54a936067

View File

@ -113,8 +113,14 @@ class ContainerCleaner(ToolBase.ToolBase):
def run(self, project): def run(self, project):
while True: while True:
url = osc.core.makeurl('https://dist.suse.de', ['ibs']) from urllib.error import HTTPError, URLError
osc.core.http_GET(url)
url = osc.core.makeurl('https://obs-login.opensuse.org', [])
try:
osc.core.http_GET(url)
except HTTPError as e:
if e.code != 401:
raise e
for package in packages: for package in packages:
url = self.makeurl(["source", project, package]) url = self.makeurl(["source", project, package])