1
0
mirror of https://github.com/pypiserver/pypiserver synced 2024-11-09 16:45:51 +01:00

make the standalone version work with jython 2.5.3

This commit is contained in:
Ralf Schmitt 2013-02-18 23:23:13 +01:00
parent b0437724ad
commit 7a786ff84f

@ -26,7 +26,11 @@ class DictImporter(object):
is_pkg = True
co = compile(s, fullname, 'exec')
module = sys.modules.setdefault(fullname, type(sys)(fullname))
try:
module = sys.modules.setdefault(fullname, type(sys)(fullname))
except TypeError: # jython?
import types
module = sys.modules.setdefault(fullname, types.ModuleType(fullname))
module.__file__ = __file__
module.__loader__ = self
if is_pkg: