[damned-lies] Don't crash if doc format cannot be determined in update_stats
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Don't crash if doc format cannot be determined in update_stats
- Date: Tue, 26 Jun 2018 07:22:35 +0000 (UTC)
commit 0a4266d3c3825a20821337585056f2f4f118ce87
Author: Claude Paroz <claude 2xlibre net>
Date: Tue Jun 26 09:21:31 2018 +0200
Don't crash if doc format cannot be determined in update_stats
stats/models.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/stats/models.py b/stats/models.py
index 0e81e377..277b2794 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -1597,7 +1597,11 @@ class Statistics(models.Model):
stats = utils.po_file_stats(file_path)
for err in stats['errors']:
self.set_error(*err)
- fig_stats = utils.get_fig_stats(file_path, self.domain.doc_format(self.branch))
+ try:
+ df = self.domain.doc_format(self.branch)
+ except Exception:
+ df = None
+ fig_stats = utils.get_fig_stats(file_path, df)
if not self.full_po:
self.full_po = PoFile.objects.create(path=file_path)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]