ķ
O'^c           @   su   d  d l  m Z y d  d l Z e Z Wn e k
 r? e Z n Xd d  Z e d    Z	 d e
 f d     YZ d S(   i˙˙˙˙(   t   contextmanagerNc         K   s#   d d l  m } | j |  | |  S(   są   
    Returns an active Redis client generated from the given database URL.

    Will attempt to extract the database id from the path url fragment, if
    none is provided.
    i˙˙˙˙(   t   Redis(   t   redis.clientR   t   from_url(   t   urlt   dbt   kwargsR   (    (    s-   /tmp/pip-unpacked-wheel-5e_doG/redis/utils.pyR      s    c         c   s   |  j    } | V| j   d  S(   N(   t   pipelinet   execute(   t	   redis_objt   p(    (    s-   /tmp/pip-unpacked-wheel-5e_doG/redis/utils.pyR      s    t   dummyc           B   s   e  Z d  Z RS(   sH   
    Instances of this class can be used as an attribute container.
    (   t   __name__t
   __module__t   __doc__(    (    (    s-   /tmp/pip-unpacked-wheel-5e_doG/redis/utils.pyR      s   (   t
   contextlibR    t   hiredist   Truet   HIREDIS_AVAILABLEt   ImportErrort   Falset   NoneR   R   t   objectR   (    (    (    s-   /tmp/pip-unpacked-wheel-5e_doG/redis/utils.pyt   <module>   s   

