%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/states/win_path.pyo

�
���^c@@sidZddlmZmZmZddlZddlmZd�Z	d�Z
d�Zdd�Z
dS(	u 
Manage the Windows System PATH
i(tabsolute_importtprint_functiontunicode_literalsN(tsixcC@sdtkrdStS(u7
    Load this state if the win_path module exists
    uwin_path.rehashuwin_path(t__salt__tFalse(((s8/usr/lib/python2.7/site-packages/salt/states/win_path.pyt__virtual__scC@sdj|�|d<|S(Nu ucomment(tjoin(trettcomments((s8/usr/lib/python2.7/site-packages/salt/states/win_path.pyt_format_commentsscC@s�i|d6td6id6dd6}td|�sIdj|�|d<|Stdrtd	j|�|d<d|d<|Std
|�td|�r�dj|�|d<t|d<n!dj|�|d<||dd
<|S(u�
    Remove the directory from the SYSTEM path

    index: where the directory should be placed in the PATH (default: 0)

    Example:

    .. code-block:: yaml

        'C:\sysinternals':
          win_path.absent
    unameuresultuchangesuucommentuwin_path.existsu{0} is not in the PATHutestu"{0} would be removed from the PATHuwin_path.removeu"Failed to remove {0} from the PATHuRemoved {0} from the PATHuremovedN(tTrueRtformatt__opts__tNoneR(tnameR((s8/usr/lib/python2.7/site-packages/salt/states/win_path.pytabsents$




c@sytjjj���Wn tk
r;tj���nXi�d6td6id6dd6}�d k	r�t	�tj
�r�d|d<t|d<|Sd��d ���fd�}d	�}��}t|�}�d k	rX�|kr|j
d
g�jdj|���|�qX�|krX|j
d
g�jdj|���d
�qXn||�}g}|d k	r*�d kr�|jdj���t||�S�|kr�|jdj����t||�Stdr�d |d<|jdj�|���||��|d<t||�Snhtdr�d |d<|jdj��d k	rhdj��nd��||��|d<t||�Sy$td�d�dt�|d<Wn3tk
r�}	|jdj|	��t|d<nX|dr$td�|d<|ds$|jd�q$n|�}
|drb�d krO|
d k	n	�|
k|d<n�d k	r�|d k	r�|jdj|dr�dnd�|���nA|jdj|dr�dnd��r�dj��nd��||
kr|||
�|d<nt||�S(!u�
    Add the directory to the system PATH at index location

    index
        Position where the directory should be placed in the PATH. This is
        0-indexed, so 0 means to prepend at the very start of the PATH.

        .. note::
            If the index is not specified, and the directory needs to be added
            to the PATH, then the directory will be appended to the PATH, and
            this state will not enforce its location within the PATH.

    Examples:

    .. code-block:: yaml

        'C:\python27':
          win_path.exists

        'C:\sysinternals':
          win_path.exists:
            - index: 0

        'C:\mystuff':
          win_path.exists:
            - index: -1
    unameuresultuchangesuucommentuIndex must be an integercS@s$gtd�D]}|j�^qS(Nuwin_path.get_path(Rtlower(tx((s8/usr/lib/python2.7/site-packages/salt/states/win_path.pyt_get_path_lowercaselsc@su|dkr��}ny|j�j��}Wntk
rEdSX�dk	rm�dkrmt|�|S|SdS(Ni(RtindexRt
ValueErrortlen(tpathtpos(RRR(s8/usr/lib/python2.7/site-packages/salt/states/win_path.pyt_indexos
cS@sii|d6|d6d6S(Nuoldunewuindex((toldtnew((s8/usr/lib/python2.7/site-packages/salt/states/win_path.pyt_changessuwarningsuQThere are only {0} directories in the PATH, using an index of {0} instead of {1}.uOThere are only {0} directories in the PATH, using an index of 0 instead of {1}.iu{0} already exists in the PATH.u,{0} already exists in the PATH at index {1}.utestu){0} would be moved from index {1} to {2}.u"{0} would be added to the PATH{1}.u
 at index {0}uwin_path.addRtrehashuEncountered error: {0}.uwin_path.rehashu5Updated registry with new PATH, but failed to rehash.u{0} {1} from index {2} to {3}.uMoveduFailed to moveu{0} {1} to the PATH{2}.uAddedu
Failed to addN(tsalttutilststringutilst
to_unicodet	TypeErrorRt	text_typeRRt
isinstancet
integer_typesRRt
setdefaulttappendRR
R
Rt	Exception(RRRRRtpre_pathtnum_dirst	old_indexR	texct	new_index((RRRs8/usr/lib/python2.7/site-packages/salt/states/win_path.pytexistsAs�




			
	








%
$


	

(t__doc__t
__future__RRRtsalt.utils.stringutilsRtsalt.extRRR
RRR.(((s8/usr/lib/python2.7/site-packages/salt/states/win_path.pyt<module>s			'

Zerion Mini Shell 1.0