diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2013-03-18 18:26:27 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2013-03-18 18:26:27 -0500 |
commit | aeb0bcfe0ef10bb24bc5198ae6b281924d6ca88f (patch) | |
tree | f83eaeea83f7710fac6cbed11b786331647644b0 /doc/exts/xmlschema.py | |
parent | e0d8251f2b8cb315b8124d2733aaab90b9f7e2a2 (diff) | |
parent | 4f6ba35fd86ae748d77557936e39db162cc282e3 (diff) | |
download | bcfg2-aeb0bcfe0ef10bb24bc5198ae6b281924d6ca88f.tar.gz bcfg2-aeb0bcfe0ef10bb24bc5198ae6b281924d6ca88f.tar.bz2 bcfg2-aeb0bcfe0ef10bb24bc5198ae6b281924d6ca88f.zip |
Merge branch 'maint'
Diffstat (limited to 'doc/exts/xmlschema.py')
-rw-r--r-- | doc/exts/xmlschema.py | 7 |
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 |