mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 16:56:15 +01:00
- core.Package.commit: fixed _service handling
Now the testsuite succeeds again. Note: we need some testcases for commits with a _service file
This commit is contained in:
parent
7995613991
commit
b5f21a4a8a
35
osc/core.py
35
osc/core.py
@ -1294,26 +1294,21 @@ class Package:
|
||||
|
||||
print_request_list(self.apiurl, self.prjname, self.name)
|
||||
|
||||
u = makeurl(self.apiurl, ['source', self.prjname, self.name])
|
||||
first_run = True
|
||||
while 1:
|
||||
f = http_GET(u)
|
||||
sfilelist = ET.parse(f).getroot()
|
||||
s = sfilelist.find('serviceinfo')
|
||||
if s == None:
|
||||
break
|
||||
if first_run:
|
||||
print 'Waiting for server side source service run',
|
||||
first_run = False
|
||||
if s.get('code') == "running":
|
||||
sys.stdout.write('.')
|
||||
sys.stdout.flush()
|
||||
else:
|
||||
break
|
||||
print ""
|
||||
rev=self.latest_rev()
|
||||
self.update(rev=rev)
|
||||
|
||||
# FIXME: add testcases for this codepath
|
||||
sinfo = sfilelist.find('serviceinfo')
|
||||
if sinfo is not None:
|
||||
print 'Waiting for server side source service run'
|
||||
u = makeurl(self.apiurl, ['source', self.prjname, self.name])
|
||||
while sinfo is not None and sinfo.get('code') == 'running':
|
||||
sys.stdout.write('.')
|
||||
sys.stdout.flush()
|
||||
# does it make sense to add some delay?
|
||||
sfilelist = ET.fromstring(http_GET(u).read())
|
||||
# if sinfo is None another commit might have occured in the "meantime"
|
||||
sinfo = sfilelist.find('serviceinfo')
|
||||
print ''
|
||||
rev=self.latest_rev()
|
||||
self.update(rev=rev)
|
||||
|
||||
def __write_storelist(self, name, data):
|
||||
if len(data) == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user