SF.net SVN: jython:[7152] trunk/jython/src/org/python/core/PyModule.java
[email protected] Sat, 16 Oct 2010 16:15:33 +0000
| Newsgroups | gmane.comp.lang.jython.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 7152
http://jython.svn.sourceforge.net/jython/?rev=7152&view=rev
Author: zyasoft
Date: 2010-10-16 16:15:33 +0000 (Sat, 16 Oct 2010)
Log Message:
-----------
Fixed case where an uninitialized module (without __dict__ defined)
would not work properly for PyModule#__findattr_ex__ (which was
introduced for #1653). Restores Jython's behavior of propagating null
for such attribute lookups in in its Java API.
Modified Paths:
--------------
trunk/jython/src/org/python/core/PyModule.java
Modified: trunk/jython/src/org/python/core/PyModule.java
===================================================================
--- trunk/jython/src/org/python/core/PyModule.java 2010-10-16 05:15:00 UTC (rev 7151)
+++ trunk/jython/src/org/python/core/PyModule.java 2010-10-16 16:15:33 UTC (rev 7152)
@@ -81,6 +81,9 @@
}
protected PyObject impAttr(String name) {
+ if (__dict__ == null) {
+ return null;
+ }
PyObject path = __dict__.__finditem__("__path__");
PyObject pyName = __dict__.__finditem__("__name__");
if (path == null || pyName == null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev