summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-05-27 19:02:26 +0200
committerGeorg Brandl <georg@python.org>2010-05-27 19:02:26 +0200
commit44a4e60dc05c35c08f15a7df2626170ce4425cee (patch)
tree5c270424131bf29f8dfca1ca7826fdca95554120
parenta14a6fd1bdbfd8806fb3ea148c633428141750bc (diff)
downloadsphinx-44a4e60dc05c35c08f15a7df2626170ce4425cee.tar.gz
Fix an AttributeError for strange xref nodes.
-rw-r--r--sphinx/writers/latex.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py
index 0e8de719..34bfd252 100644
--- a/sphinx/writers/latex.py
+++ b/sphinx/writers/latex.py
@@ -1058,7 +1058,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
# 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: