
ݲk^c           @   sd   y d  d l  Z  Wn e k
 r) d Z  n Xd d l m Z d d l m Z d e f d     YZ d S(   iNi   (   t   Environmenti   (   t   BinstarSpect   NotebookSpecc           B   s;   e  Z d Z d d   Z d   Z d   Z e d    Z RS(   c         K   s   | |  _  i  |  _ d  S(   N(   t   namet   nb(   t   selfR   t   kwargs(    (    s7   lib/python2.7/site-packages/conda_env/specs/notebook.pyt   __init__   s    	c         C   s   |  j    } | r d GHn  | S(   Ns   WARNING: Notebook environments are deprecated and scheduled to be removed in conda 4.5. See conda issue #5843 at https://github.com/conda/conda/pull/5843 for more information.(   t   _can_handle(   R   t   result(    (    s7   lib/python2.7/site-packages/conda_env/specs/notebook.pyt
   can_handle   s    c         C   s   y9 t  j j t |  j  j    |  _ d |  j d k SWn t k
 rU d |  _ nh t	 k
 rz d j
 |  j  |  _ nC t  j j t f k
 r d j
 |  j  |  _ n t k
 r t SXt S(   Nt   environmentt   metadatas0   Please install nbformat:
	conda install nbformats&   {} does not exist or can't be accesseds&   {} does not looks like a notebook file(   t   nbformatt   readert   readst   openR   t   readR   t   AttributeErrort   msgt   IOErrort   formatt   NotJSONErrort   KeyErrort	   Exceptiont   False(   R   (    (    s7   lib/python2.7/site-packages/conda_env/specs/notebook.pyR      s    $c         C   sC   d |  j  d d k r* t d  } | j St |  j  d d   Sd  S(   Nt   remoteR   R   s   darth/deathstar(   R   R   R   R    (   R   t   spec(    (    s7   lib/python2.7/site-packages/conda_env/specs/notebook.pyR   )   s    N(	   t   __name__t
   __module__t   NoneR   R   R
   R   t   propertyR   (    (    (    s7   lib/python2.7/site-packages/conda_env/specs/notebook.pyR      s
   		(	   R   t   ImportErrorR   t   envR    t   binstarR   t   objectR   (    (    (    s7   lib/python2.7/site-packages/conda_env/specs/notebook.pyt   <module>   s   
