1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 06:46:13 +01:00

- ServiceInfo.execute: also cleanup dirs

Fixes #67.
This commit is contained in:
Marcus Huewe 2014-01-09 10:24:48 +01:00
parent 57d9b48dc0
commit 5e5427f9be

View File

@ -357,7 +357,11 @@ class Serviceinfo:
# cleanup existing generated files
for filename in os.listdir(dir):
if filename.startswith('_service:') or filename.startswith('_service_'):
os.unlink(os.path.join(dir, filename))
ent = os.path.join(dir, filename)
if os.path.isdir(ent):
shutil.rmtree(ent)
else:
os.unlink(ent)
allservices = self.services or []
if singleservice and not singleservice in allservices: