mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
register "_service" file, in case it got created
This commit is contained in:
parent
1ca862308b
commit
ac5990fbd0
@ -4536,10 +4536,12 @@ def stripETxml(node):
|
||||
|
||||
def addDownloadUrlService(url):
|
||||
service_file = os.path.join(os.getcwd(), '_service')
|
||||
addfile = False
|
||||
if os.path.exists( service_file ):
|
||||
services = ET.parse(os.path.join(os.getcwd(), '_service')).getroot()
|
||||
else:
|
||||
services = ET.fromstring("<services />")
|
||||
addfile = True
|
||||
stripETxml( services )
|
||||
si = Serviceinfo()
|
||||
s = si.addDownloadUrl(services, url)
|
||||
@ -4551,6 +4553,8 @@ def addDownloadUrlService(url):
|
||||
f = open(service_file, 'wb')
|
||||
f.write(reparsed.toprettyxml(indent=" "))
|
||||
f.close()
|
||||
if addfile:
|
||||
addFiles( ['_service'] )
|
||||
|
||||
# download file
|
||||
si.execute(os.getcwd())
|
||||
|
Loading…
Reference in New Issue
Block a user