Skip to content

Commit

Permalink
Don't abort if weakremover.inc don't exist on source project
Browse files Browse the repository at this point in the history
For ALP, weakremover.inc might not be part of the staging parent
project. Just ignore 404 error in that case.
  • Loading branch information
fcrozat committed Jan 23, 2024
1 parent 105eea5 commit 950054d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions osclib/freeze_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ def copy_weakremovers(self):
targeturl = self.api.makeurl(['source', self.prj, '000release-packages', 'weakremovers.inc'],
{'comment': 'Update weakremovers.inc'})
oldinc = osc.core.http_GET(targeturl).read()
sourceurl = self.api.makeurl(['source', self.api.project, '000release-packages', 'weakremovers.inc'])
inc = osc.core.http_GET(sourceurl).read()
if inc != oldinc:
osc.core.http_PUT(targeturl, data=inc)
except HTTPError:
# if it doesn't exist, don't update
return
sourceurl = self.api.makeurl(['source', self.api.project, '000release-packages', 'weakremovers.inc'])
inc = osc.core.http_GET(sourceurl).read()
if inc != oldinc:
osc.core.http_PUT(targeturl, data=inc)

def is_bootstrap(self):
"""Check if there is a bootstrap copy repository."""
Expand Down

0 comments on commit 950054d

Please sign in to comment.