summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--sphinx/builders/gettext.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index abe83d28f..61f1475b0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -20,6 +20,7 @@ Bugs fixed
* #1386: Fix bug preventing more than one theme being added by the entry point
mechanism.
* #1370: Ignore "toctree" nodes in text writer, instead of raising.
+* #1364: Fix 'make gettext' fails when the '.. todolist::' directive is present.
Documentation
-------------
diff --git a/sphinx/builders/gettext.py b/sphinx/builders/gettext.py
index fb8bd0ccd..bf43f9b4a 100644
--- a/sphinx/builders/gettext.py
+++ b/sphinx/builders/gettext.py
@@ -55,6 +55,9 @@ class Catalog(object):
self.metadata = {} # msgid -> file, line, uid
def add(self, msg, origin):
+ if not hasattr(origin, 'uid'):
+ # Nodes that are replicated like todo don't have a uid, however i18n is also unnecessary.
+ return
if msg not in self.metadata: # faster lookup in hash
self.messages.append(msg)
self.metadata[msg] = []