From 263e04f21bb9f84f72aa72d5e98c54d18d8d572a Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 18 Mar 2013 14:52:28 -0400 Subject: fixed doc build on py2.4 --- doc/exts/xmlschema.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc/exts') 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 -- cgit v1.2.3-1-g7c22