From 581204696cdc2dff9a9959a7213dca2e79f7e55c Mon Sep 17 00:00:00 2001 From: Ivo De Decker Date: Sun, 1 Sep 2013 20:56:09 +0000 Subject: [PATCH] if outputdir is defined, write dates file there This introduces a new variable OUTPUTDIR, which overrides the location where the new dates file is written. This allow to run britney against a read-only copy of the data. Signed-off-by: Niels Thykier --- britney.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/britney.py b/britney.py index ce1782d..a337ac5 100755 --- a/britney.py +++ b/britney.py @@ -2368,7 +2368,10 @@ class Britney(object): self.write_controlfiles(self.options.testing, 'testing') # write dates - self.write_dates(self.options.testing, self.dates) + try: + self.write_dates(self.options.outputdir, self.dates) + except AttributeError: + self.write_dates(self.options.testing, self.dates) # write HeidiResult self.__log("Writing Heidi results to %s" % self.options.heidi_output)