Commits

Georg Brandl committed b92dd79

Fix an AttributeError for strange xref nodes.

  • Participants
  • Parent commits bad03d5

Comments (0)

Files changed (1)

File sphinx/writers/latex.py

                 # reference to a label
                 id = uri[1:].replace('#', ':')
             self.body.append(self.hyperlink(id))
-            if len(node) and 'std-term' in node[0].get('classes', []):
+            if len(node) and hasattr(node[0], 'attributes') and \
+                   'std-term' in node[0].get('classes', []):
                 # don't add a pageref for glossary terms
                 self.context.append('}')
             else: