Python 2.4 fixes.
This commit is contained in:
parent
1bc8681cb4
commit
f88b0a11e9
|
@ -164,7 +164,7 @@ class Importer(object):
|
||||||
try:
|
try:
|
||||||
self._ignore.append(fullname)
|
self._ignore.append(fullname)
|
||||||
try:
|
try:
|
||||||
__import__(fullname, fromlist=['*'])
|
__import__(fullname, {}, {}, ['*'])
|
||||||
except ImportError:
|
except ImportError:
|
||||||
LOG.debug('find_module(%r) returning self', fullname)
|
LOG.debug('find_module(%r) returning self', fullname)
|
||||||
return self
|
return self
|
||||||
|
@ -266,7 +266,7 @@ class Stream(BasicStream):
|
||||||
def __init__(self, context):
|
def __init__(self, context):
|
||||||
self._context = context
|
self._context = context
|
||||||
self._lock = threading.Lock()
|
self._lock = threading.Lock()
|
||||||
self._rhmac = hmac.new(context.key, digestmod=sha.new)
|
self._rhmac = hmac.new(context.key, digestmod=sha)
|
||||||
self._whmac = self._rhmac.copy()
|
self._whmac = self._rhmac.copy()
|
||||||
|
|
||||||
_find_global = None
|
_find_global = None
|
||||||
|
@ -702,7 +702,7 @@ class ExternalContext(object):
|
||||||
args = (self,) + args
|
args = (self,) + args
|
||||||
|
|
||||||
try:
|
try:
|
||||||
obj = __import__(modname, fromlist=['*'])
|
obj = __import__(modname, {}, {}, ['*'])
|
||||||
if klass:
|
if klass:
|
||||||
obj = getattr(obj, klass)
|
obj = getattr(obj, klass)
|
||||||
fn = getattr(obj, func)
|
fn = getattr(obj, func)
|
||||||
|
|
|
@ -109,7 +109,7 @@ class ModuleResponder(object):
|
||||||
reply_to, fullname = data
|
reply_to, fullname = data
|
||||||
LOG.debug('get_module(%r, %r)', reply_to, fullname)
|
LOG.debug('get_module(%r, %r)', reply_to, fullname)
|
||||||
try:
|
try:
|
||||||
module = __import__(fullname, fromlist=[''])
|
module = __import__(fullname, {}, {}, [''])
|
||||||
is_pkg = getattr(module, '__path__', None) is not None
|
is_pkg = getattr(module, '__path__', None) is not None
|
||||||
path = inspect.getsourcefile(module)
|
path = inspect.getsourcefile(module)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue