Skip to content

Commit

Permalink
Merge pull request #2988 from DimStar77/osc1.x
Browse files Browse the repository at this point in the history
stagingapi: fix execution with OSC 1.x
  • Loading branch information
DimStar77 committed Jul 18, 2023
2 parents 1252857 + d257369 commit 15a1347
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions osclib/stagingapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import logging
import textwrap
from urllib.error import HTTPError, URLError
from inspect import signature

import time
import re
from lxml import etree as ET


from osc import conf
from osc import oscerr
from osclib.core import attribute_value_load
Expand Down Expand Up @@ -1533,6 +1533,10 @@ def delete_empty_adi_project(self, project):
return

try:
delete_project(self.apiurl, project, force=True)
sig = signature(delete_project)
if "recursive=" in str(sig):
delete_project(self.apiurl, project, force=True, recursive=True)
else:
delete_project(self.apiurl, project, force=True)
except HTTPError as e:
print(e)

0 comments on commit 15a1347

Please sign in to comment.