Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/module_utils/common/text/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/module_utils/common/text/formatters.pyo

�
�Udac@`s�ddlmZmZmZeZddlZddlmZi	dd6dd6dd
6dd6dd6dd6dd6d d6dd6Z	d�Z
ded�Z
edd�ZdS(!i(tabsolute_importtdivisiontprint_functionN(t	iteritemsiiPtYiFtZi<tEi2tPi(tTitGitMi
tKtBcC`sSg}xF|D]>}y|j|j��Wq
tk
rJ|j|�q
Xq
W|S(saLowercase elements of a list.

    If an element is not a string, pass it through untouched.
    (tappendtlowertAttributeError(tlsttloweredtvalue((sO/usr/lib/python2.7/site-packages/ansible/module_utils/common/text/formatters.pytlenient_lowercases

cC`s�tjdt|�dtj�}|dkrFtdt|���nyt|jd��}Wn0tk
r�td|jd�|f��nX|jd�}|dkr�|}n|dkr�t	t
|��S|dj�}yt|}Wn9tk
r+td||d	j
tj��f��nXd
}d}	|rMd}d
}	nt|�dkr�d|||f}
|d
kr�d||	f}
n|	|j�kr�q�|d|kr�td||
f��q�nt	t
||��S(s�Convert number in string format into bytes (ex: '2K' => 2048) or using unit argument.

    example: human_to_bytes('10M') <=> human_to_bytes(10, 'M').

    When isbits is False (default), converts bytes from a human-readable format to integer.
        example: human_to_bytes('1MB') returns 1048576 (int).
        The function expects 'B' (uppercase) as a byte identifier passed
        as a part of 'name' param string or 'unit', e.g. 'MB'/'KB'/etc.
        (except when the identifier is single 'b', it is perceived as a byte identifier too).
        if 'Mb'/'Kb'/... is passed, the ValueError will be rased.

    When isbits is True, converts bits from a human-readable format to integer.
        example: human_to_bytes('1Mb', isbits=True) returns 1048576 (int) -
        string bits representation was passed and return as a number or bits.
        The function expects 'b' (lowercase) as a bit identifier, e.g. 'Mb'/'Kb'/etc.
        if 'MB'/'KB'/... is passed, the ValueError will be rased.
    s^\s*(\d*\.?\d*)\s*([A-Za-z]+)?tflagss5human_to_bytes() can't interpret following string: %sisQhuman_to_bytes() can't interpret following number: %s (original input string: %s)iisOhuman_to_bytes() failed to convert %s (unit = %s). The suffix must be one of %ss, Rtbytetbtbitsexpect %s%s or %ssexpect %s or %ssGhuman_to_bytes() failed to convert %s. Value is not a valid string (%s)N(tretsearchtstrt
IGNORECASEtNonet
ValueErrortfloattgroupt	ExceptiontinttroundtuppertSIZE_RANGEStjointkeystlenR(tnumbertdefault_unittisbitstmtnumtunitt	range_keytlimitt
unit_classtunit_class_nametexpect_message((sO/usr/lib/python2.7/site-packages/ansible/module_utils/common/text/formatters.pythuman_to_bytes's>!
#	
,	cC`s�d}|rd}nd}xgttt�dd��D]J\}}|dkr[||ks}|dk	r7|j�|dkr7Pq7q7W|dkr�||d7}n|}d|||fS(	NtBytestbitsttkeycS`s	|dS(Ni((titem((sO/usr/lib/python2.7/site-packages/ansible/module_utils/common/text/formatters.pyt<lambda>isiis%.2f %s(tsortedRR$RR#(tsizeR*R-tbasetsuffixR/((sO/usr/lib/python2.7/site-packages/ansible/module_utils/common/text/formatters.pytbytes_to_humancs	(:l lIIIi@ii(t
__future__RRRttypet
__metaclass__Rtansible.module_utils.sixRR$RRtFalseR3R>(((sO/usr/lib/python2.7/site-packages/ansible/module_utils/common/text/formatters.pyt<module>s 
	<

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]