timestamp = datetime.datetime.strptime(ts_str, timeformat)
email = commit['author']['email']
committers.append((timestamp, email))
- committers.sort()
- if self.verbose > 1:
- LOG.debug("Got committers: {}".format(pp(committers)))
- self.mail_to_addresses.append(committers[-1][1])
+ if committers:
+ committers.sort()
+ if self.verbose > 1:
+ LOG.debug("Got committers: {}".format(pp(committers)))
+ self.mail_to_addresses.append(committers[-1][1])
+ else:
+ LOG.debug("No committers found to append a mail address.")
if 'git_ssh_url' in self.json_data['project']:
self.git_ssh_url = self.json_data['project']['git_ssh_url']