[FIX] runbot: avoid useless make_stats logs

This commit is contained in:
Xavier-Do 2020-03-20 11:24:15 +01:00
parent 360e31ade4
commit 55ed520823

View File

@ -574,12 +574,13 @@ class ConfigStep(models.Model):
return build_values return build_values
def _make_stats(self, build): def _make_stats(self, build):
if not ((build.branch_id.make_stats or build.config_data.get('make_stats')) and self.make_stats):
return
build._log('make_stats', 'Getting stats from log file') build._log('make_stats', 'Getting stats from log file')
log_path = build._path('logs', '%s.txt' % self.name) log_path = build._path('logs', '%s.txt' % self.name)
if not os.path.exists(log_path): if not os.path.exists(log_path):
build._log('make_stats', 'Log **%s.txt** file not found' % self.name, level='INFO', log_type='markdown') build._log('make_stats', 'Log **%s.txt** file not found' % self.name, level='INFO', log_type='markdown')
return return
if (build.branch_id.make_stats or build.config_data.get('make_stats')) and self.make_stats:
try: try:
regex_ids = self.build_stat_regex_ids regex_ids = self.build_stat_regex_ids
if not regex_ids: if not regex_ids: