def import_conn_manager(module):
    parts = module.rsplit(":", 1)
    if len(parts) == 1:
        raise ImportError("can't import handler '%s'" % module)

    module, obj = parts[0], parts[1]
    try:
        __import__(module)
    except __HOLE__:
        if module.endswith(".py") and os.path.exists(module):
            raise ImportError("Failed to find manager, did "
                "you mean '%s:%s'?" % (module.rsplit(".",1)[0], obj))
    
    mod = sys.modules[module]
    mgr = eval(obj, mod.__dict__)
    if mgr is None:
        raise ImportError("Failed to find manager object: %r" % mgr)
    return mgr
dataset/ETHPy150Open benoitc/dj-revproxy/revproxy/util.py/import_conn_manager