mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
- fix crash on removal of local _service file
This commit is contained in:
parent
cdc21c6011
commit
da52ea1331
@ -2067,9 +2067,10 @@ rev: %s
|
||||
curdir = os.getcwd()
|
||||
os.chdir(self.absdir) # e.g. /usr/lib/obs/service/verify_file fails if not inside the project dir.
|
||||
si = Serviceinfo()
|
||||
if self.filenamelist.count('_service') or self.filenamelist_unvers.count('_service'):
|
||||
service = ET.parse(os.path.join(self.absdir, '_service')).getroot()
|
||||
si.read(service)
|
||||
if os.path.exists('_service'):
|
||||
if self.filenamelist.count('_service') or self.filenamelist_unvers.count('_service'):
|
||||
service = ET.parse(os.path.join(self.absdir, '_service')).getroot()
|
||||
si.read(service)
|
||||
si.getProjectGlobalServices(self.apiurl, self.prjname, self.name)
|
||||
r = si.execute(self.absdir, mode, singleservice, verbose)
|
||||
os.chdir(curdir)
|
||||
|
Loading…
Reference in New Issue
Block a user