summaryrefslogtreecommitdiffstats
path: root/doc/exts
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-18 14:52:28 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-18 14:52:35 -0400
commit263e04f21bb9f84f72aa72d5e98c54d18d8d572a (patch)
tree6a341338f269f2c3ff089c22f06e38f38d51343b /doc/exts
parentc82807da53e2e76d70b0496fb3bcfb476d590968 (diff)
downloadbcfg2-263e04f21bb9f84f72aa72d5e98c54d18d8d572a.tar.gz
bcfg2-263e04f21bb9f84f72aa72d5e98c54d18d8d572a.tar.bz2
bcfg2-263e04f21bb9f84f72aa72d5e98c54d18d8d572a.zip
fixed doc build on py2.4
Diffstat (limited to 'doc/exts')
-rw-r--r--doc/exts/xmlschema.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/exts/xmlschema.py b/doc/exts/xmlschema.py
index 727b4bbd0..24cbf2e2d 100644
--- a/doc/exts/xmlschema.py
+++ b/doc/exts/xmlschema.py
@@ -76,6 +76,11 @@ from sphinx.util.nodes import make_refnode, split_explicit_title, \
from sphinx.util.compat import Directive
from sphinx.domains import ObjType, Domain
+try:
+ from new import classobj
+except ImportError:
+ classobj = type
+
XS = "http://www.w3.org/2001/XMLSchema"
XS_NS = "{%s}" % XS
NSMAP = dict(xs=XS)
@@ -653,7 +658,7 @@ def append_node(parent, cls_or_node, *contents):
def build_node(cls_or_node, *contents):
- if isinstance(cls_or_node, type):
+ if isinstance(cls_or_node, (type, classobj)):
rv = cls_or_node()
else:
rv = cls_or_node