Python 2.4 fixes.

pull/35/head
David Wilson 8 years ago
parent 1bc8681cb4
commit f88b0a11e9

@ -164,7 +164,7 @@ class Importer(object):
try:
self._ignore.append(fullname)
try:
__import__(fullname, fromlist=['*'])
__import__(fullname, {}, {}, ['*'])
except ImportError:
LOG.debug('find_module(%r) returning self', fullname)
return self
@ -266,7 +266,7 @@ class Stream(BasicStream):
def __init__(self, context):
self._context = context
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()
_find_global = None
@ -702,7 +702,7 @@ class ExternalContext(object):
args = (self,) + args
try:
obj = __import__(modname, fromlist=['*'])
obj = __import__(modname, {}, {}, ['*'])
if klass:
obj = getattr(obj, klass)
fn = getattr(obj, func)

@ -109,7 +109,7 @@ class ModuleResponder(object):
reply_to, fullname = data
LOG.debug('get_module(%r, %r)', reply_to, fullname)
try:
module = __import__(fullname, fromlist=[''])
module = __import__(fullname, {}, {}, [''])
is_pkg = getattr(module, '__path__', None) is not None
path = inspect.getsourcefile(module)
try:

Loading…
Cancel
Save