[Jython-checkins] jython: Dead code removed from PyModule.
jeff.allen
jython-checkins at python.org
Fri Sep 11 00:58:41 CEST 2015
https://hg.python.org/jython/rev/57fb3b499c0d
changeset: 7725:57fb3b499c0d
parent: 7717:b2c98eeaa744
user: Jeff Allen <ja.py at farowl.co.uk>
date: Tue Sep 01 21:34:21 2015 +0100
summary:
Dead code removed from PyModule.
Discussion in #1423 refers.
files:
src/org/python/core/PyModule.java | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/org/python/core/PyModule.java b/src/org/python/core/PyModule.java
--- a/src/org/python/core/PyModule.java
+++ b/src/org/python/core/PyModule.java
@@ -106,15 +106,11 @@
PyObject modules = Py.getSystemState().modules;
PyObject attr = modules.__finditem__(fullName);
- if (path == Py.None) {
- // XXX: disabled
- //attr = imp.loadFromClassLoader(fullName,
- // Py.getSystemState().getClassLoader());
- } else if (path instanceof PyList) {
+ if (path instanceof PyList) {
if (attr == null) {
attr = imp.find_module(name, fullName, (PyList)path);
}
- } else {
+ } else if (path != Py.None) {
throw Py.TypeError("__path__ must be list or None");
}
--
Repository URL: https://hg.python.org/jython
More information about the Jython-checkins
mailing list