[jython] java modules have no __doc__. Closes #109562

authorSylvain Thénault <sylvain.thenault@logilab.fr>
changesetec02884a688e
branchstable
phasepublic
hiddenno
parent revision#4112294d1994 Added tag logilab-astng-debian-version-0.24.1-1 for changeset 185d76f61c9c
child revision#ad719cb42072 default is stable, #ad41b46cefe3 backport stable
files modified by this revision
raw_building.py
# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1351008169 -7200
# Tue Oct 23 18:02:49 2012 +0200
# Branch stable
# Node ID ec02884a688e1dc6b66af569d8577b3a16d9d3d2
# Parent 4112294d199497425faf7ff5d3a5710acbea793a
[jython] java modules have no __doc__. Closes #109562

diff --git a/raw_building.py b/raw_building.py
@@ -212,11 +212,15 @@
1          because it's a built-in module or because the .py is not available)
2          """
3          self._module = module
4          if modname is None:
5              modname = module.__name__
6 -        node = build_module(modname, module.__doc__)
7 +        try:
8 +            node = build_module(modname, module.__doc__)
9 +        except AttributeError:
10 +            # in jython, java modules have no __doc__ (see #109562)
11 +            node = build_module(modname)
12          node.file = node.path = path and abspath(path) or path
13          MANAGER.astng_cache[modname] = node
14          node.package = hasattr(module, '__path__')
15          self._done = {}
16          self.object_build(node, module)