ó
P'—^c           @@  sµ   d  Z  d d l m Z d d l Z d d l Z d d l m Z d d l m Z d d l	 m
 Z
 d d l m Z d	 d
 g Z d Z e
 e j j d e ƒ ƒ Z d	 e f d „  ƒ  YZ d S(   s~   
    celery.loaders.default
    ~~~~~~~~~~~~~~~~~~~~~~

    The default loader used when no custom app has been initialized.

i    (   t   absolute_importN(   t   DictAttribute(   t   NotConfigured(   t	   strtobooli   (   t
   BaseLoadert   Loadert   DEFAULT_CONFIG_MODULEt   celeryconfigt	   C_WNOCONFc           B@  s#   e  Z d  Z d „  Z e d „ Z RS(   s#   The loader used by the default app.c         C@  s
   t  | ƒ S(   N(   R   (   t   selft   settingsdict(    (    s8   /tmp/pip-unpacked-wheel-gV1wwp/celery/loaders/default.pyt   setup_settings   s    c         C@  s§   t  j j d t ƒ } y |  j | ƒ } Wnb t k
 rŒ | sD ‚  n  t r t  j j d ƒ r t j t	 d j
 d | ƒ ƒ ƒ n  |  j i  ƒ SXt |  _ |  j | ƒ Sd S(   s|   Read configuration from :file:`celeryconfig.py` and configure
        celery and Django so it can be used by regular Python.t   CELERY_CONFIG_MODULEt   FORKED_BY_MULTIPROCESSINGsP   No {module} module found! Please make sure it exists and is available to Python.t   moduleN(   t   ost   environt   getR   t   _import_config_modulet   ImportErrorR   t   warningst   warnR   t   formatR   t   Truet
   configured(   R	   t   fail_silentlyt
   confignamet   usercfg(    (    s8   /tmp/pip-unpacked-wheel-gV1wwp/celery/loaders/default.pyt   read_configuration"   s    				(   t   __name__t
   __module__t   __doc__R   R   R   (    (    (    s8   /tmp/pip-unpacked-wheel-gV1wwp/celery/loaders/default.pyR      s   	(   R   t
   __future__R    R   R   t   celery.datastructuresR   t   celery.exceptionsR   t   celery.utilsR   t   baseR   t   __all__R   R   R   t   FalseR   R   (    (    (    s8   /tmp/pip-unpacked-wheel-gV1wwp/celery/loaders/default.pyt   <module>   s   