mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Jython 2.5.2
This commit is contained in:
@@ -61,6 +61,7 @@ ImportError exception, it is silently ignored.
|
||||
import sys
|
||||
import os
|
||||
import __builtin__
|
||||
ModuleType = type(os)
|
||||
|
||||
|
||||
def makepath(*paths):
|
||||
@@ -73,8 +74,10 @@ def makepath(*paths):
|
||||
def abs__file__():
|
||||
"""Set all module' __file__ attribute to an absolute path"""
|
||||
for m in sys.modules.values():
|
||||
if hasattr(m, '__loader__'):
|
||||
continue # don't mess with a PEP 302-supplied __file__
|
||||
if not isinstance(m, ModuleType) or hasattr(m, '__loader__'):
|
||||
# only modules need the abspath in Jython. and don't mess
|
||||
# with a PEP 302-supplied __file__
|
||||
continue
|
||||
f = getattr(m, '__file__', None)
|
||||
if f is None:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user