o
    x[hƒ  ã                   @   s4   d Z ddlmZ ddlmZ d
dedefdd„Zd	S )z7Common cloud-init devel command line utility functions.é    )ÚPaths)ÚInitÚ Úfetch_existing_datasourceÚreturnc                 C   s(   t g d�}| r|j| d� | ¡  |jS )aÂ  Return a Paths object based on the system configuration on disk.

    :param fetch_existing_datasource: String one of check or trust. Whether to
        load the pickled datasource before returning Paths. This is necessary
        when using instance paths via Paths.get_ipath method which are only
        known from the instance-id metadata in the detected datasource.

    :raises: DataSourceNotFoundException when no datasource cache exists.
    )Úds_deps)Úexisting)r   ÚfetchÚread_cfgÚpaths)r   Úinit© r   ú>/usr/lib/python3/dist-packages/cloudinit/cmd/devel/__init__.pyÚread_cfg_paths	   s
   

r   N)r   )Ú__doc__Úcloudinit.helpersr   Úcloudinit.stagesr   Ústrr   r   r   r   r   Ú<module>   s   