def __writeReport(self, report):
     if self._reportForcedPath:
         reportPath = self._reportForcedPath
     else:
         reportPath = self._reportDefaultPath
         #if running in diagnose mode, don't overrite it
         if self._diagnoseMode:
             reportPath = reportPath + ".diag"
     self.debug("Writing report file '%s'", reportPath)
     report.status = self._status
     fileutils.ensureDirExists(os.path.dirname(reportPath),
                               "report", self._pathAttr)
     saver = IniFile()
     saver.saveToFile(report, reportPath)
     if self._pathAttr:
         self._pathAttr.apply(reportPath)