%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/utils/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/utils/lazy.pyc

�
���^c@@s�dZddlmZmZddlZddlZyddlmZWn!e	k
rkddl
mZnXeje�Z
d�Zdefd��YZdS(uC
Lazily-evaluated data structures, primarily used by Salt's loader
i(tabsolute_importtunicode_literalsN(tMutableMappingcC@sI|stjjd��n||krEtjj|j|���ndS(u6
    Check that the function passed really exists
    u-Must specify a function to run!
ex: manage.upN(tsaltt
exceptionstSaltInvocationErrortCommandExecutionErrortmissing_fun_string(tlazy_objtfun((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt
verify_funs
	tLazyDictcB@s�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(u
    A base class of dict which will lazily load keys once they are needed

    TODO: negative caching? If you ask for 'foo' and it doesn't exist it will
    look EVERY time unless someone calls load_all()
    As of now this is left to the class which inherits from this base
    cC@s|j�dS(N(tclear(tself((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt__init__)scC@st|jp|j�S(N(tboolt_dicttloaded(R
((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt__nonzero__,scC@s
|j�S(N(R(R
((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt__bool__0scC@s%t|dt��|_t|_dS(u 
        Clear the dict
        umod_dict_classN(tgetattrtdictRtFalseR(R
((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyR4scC@s
t��dS(u3
        Load a single item if you have it
        N(tNotImplementedError(R
tkey((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt_load>scC@s
t��dS(u"
        Load all of them
        N(R(R
((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt	_load_allDscC@stS(uT
        Whether or not the key is missing (meaning we know it's not there)
        (R(R
R((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt_missingJscC@s
dj|�S(u�
        Return the error string for a missing function.

        Override this to return a more meaningfull error message if possible
        u'{0}' is not available.(tformat(R
t
function_name((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyRPscC@s||j|<dS(N(R(R
Rtval((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt__setitem__XscC@s|j|=dS(N(R(R
R((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt__delitem__[scC@s�|j|�rt|��n||jkr�|jr�|j|�ratjd|�|j|Stjd||j|��t|��n|j|SdS(u?
        Check if the key is ttld out, then do the get
        u
LazyLoaded %suCould not LazyLoad %s: %sN(RtKeyErrorRRRtlogtdebugR(R
R((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt__getitem__^scC@s#|js|j�nt|j�S(N(RRtlenR(R
((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt__len__ps	
cC@s#|js|j�nt|j�S(N(RRtiterR(R
((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt__iter__vs	
(t__name__t
__module__t__doc__RRRRRRRRRR R$R&R((((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyR!s				
								(R+t
__future__RRtloggingtsalt.exceptionsRtcollections.abcRtImportErrortcollectionst	getLoggerR)R"R
R(((s3/usr/lib/python2.7/site-packages/salt/utils/lazy.pyt<module>s
	

Zerion Mini Shell 1.0