ó
;^c           @   sf   d  Z  d d l m Z d d l m Z d d l m Z i e j d 6e j d 6Z d   Z d   Z	 d	 S(
   sC   Module containing some of the logic for our VCS installation logic.i’’’’(   t
   exceptions(   t   git(   t	   mercurialR   R   c         C   s   t  j |  } t } t } y |   } Wn' t j k
 rQ } t |  GHt } n X| si d j |  GHn  t | ov |   d S(   sĄ   Determine which version control hook to install.

    For more information about the callback signature, see:
    https://docs.python.org/2/library/optparse.html#optparse-option-callbacks
    s    Could not find the {0} directoryN(	   t   _INSTALLERSt   gett   Falset   exct   HookInstallationErrort   strt   Truet   formatt
   SystemExit(   t   optiont   option_stringt   valuet   parsert	   installert   erroredt
   successfult
   hook_error(    (    s1   /tmp/pip-unpacked-wheel-HvL2bc/flake8/main/vcs.pyt   install   s    
c           C   s   t  t j    S(   s   Return the list of VCS choices.(   t   listR   t   keys(    (    (    s1   /tmp/pip-unpacked-wheel-HvL2bc/flake8/main/vcs.pyt   choices%   s    N(
   t   __doc__t   flake8R    R   t   flake8.mainR   R   R   R   R   (    (    (    s1   /tmp/pip-unpacked-wheel-HvL2bc/flake8/main/vcs.pyt   <module>   s   
	