From dfef4b3429303fe03d543448c95b1598e85c1618 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 12 Jan 2009 19:29:00 +0600 Subject: [PATCH] made api 2.4 compatible --- eventlet/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eventlet/api.py b/eventlet/api.py index dcea510..e1d0dba 100644 --- a/eventlet/api.py +++ b/eventlet/api.py @@ -305,7 +305,7 @@ def call_after_local(seconds, function, *args, **kwds): # for compatibility with original eventlet API call_after = call_after_local -class _SilentException(BaseException): +class _SilentException(Exception): pass class FakeTimer: @@ -462,7 +462,7 @@ def use_hub(mod=None): if hasattr(_threadlocal, 'hub'): del _threadlocal.hub if isinstance(mod, str): - mod = __import__('eventlet.hubs.' + mod, fromlist=['Hub']) + mod = __import__('eventlet.hubs.' + mod, globals(), locals(), ['Hub']) if hasattr(mod, 'Hub'): _threadlocal.Hub = mod.Hub else: