aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/ccc/ccclib/Driver.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index 4472ddcc37..2015b2f0ed 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -228,10 +228,11 @@ class Driver(object):
try:
self.executeJobs(args, jobs)
except:
- for f in self.resultFiles:
- # Fail if removing a result fails:
- if os.path.exists(f):
- os.remove(f)
+ if not args.getLastArg(self.parser.saveTempsOption):
+ for f in self.resultFiles:
+ # Fail if removing a result fails:
+ if os.path.exists(f):
+ os.remove(f)
raise
finally:
for f in self.tempFiles: