mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-15 00:36:11 +01:00
Merge pull request #1351 from adrianschroeter/service_scmsync
Fix local service execution of scmsync packages
This commit is contained in:
commit
a461e16dec
15
osc/core.py
15
osc/core.py
@ -2630,14 +2630,13 @@ rev: %s
|
|||||||
os.chdir(self.absdir) # e.g. /usr/lib/obs/service/verify_file fails if not inside the project dir.
|
os.chdir(self.absdir) # e.g. /usr/lib/obs/service/verify_file fails if not inside the project dir.
|
||||||
si = Serviceinfo()
|
si = Serviceinfo()
|
||||||
if os.path.exists('_service'):
|
if os.path.exists('_service'):
|
||||||
if self.filenamelist.count('_service') or self.filenamelist_unvers.count('_service'):
|
try:
|
||||||
try:
|
service = ET.parse(os.path.join(self.absdir, '_service')).getroot()
|
||||||
service = ET.parse(os.path.join(self.absdir, '_service')).getroot()
|
except ET.ParseError as v:
|
||||||
except ET.ParseError as v:
|
line, column = v.position
|
||||||
line, column = v.position
|
print('XML error in _service file on line %s, column %s' % (line, column))
|
||||||
print('XML error in _service file on line %s, column %s' % (line, column))
|
sys.exit(1)
|
||||||
sys.exit(1)
|
si.read(service)
|
||||||
si.read(service)
|
|
||||||
si.getProjectGlobalServices(self.apiurl, self.prjname, self.name)
|
si.getProjectGlobalServices(self.apiurl, self.prjname, self.name)
|
||||||
r = si.execute(self.absdir, mode, singleservice, verbose)
|
r = si.execute(self.absdir, mode, singleservice, verbose)
|
||||||
os.chdir(curdir)
|
os.chdir(curdir)
|
||||||
|
Loading…
Reference in New Issue
Block a user