403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/computerjanitor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyc
ó
¤Oc@sxddlZddlZddlZddlZddlZejƒZdefd„ƒYZdefd„ƒYZ	dS(iÿÿÿÿNtPlugincBsSeZdZd„Zd„ZeeeƒZd„Zd„Zd„Z	d„Z
RS(s‡Base class for plugins.
    
    These plugins only do one thing: identify cruft. See the 'get_cruft'
    method for details.
    
    cCst|dƒr|jSgSdS(Nt
_condition(thasattrR(tself((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyt
get_condition"scCs
||_dS(N(R(Rt	condition((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyt
set_condition(scCs
||_dS(s¥Set the Application instance this plugin belongs to.
        
        This is used by the plugin manager when creating the plugin
        instance. In a perfect world, this would be done via the
        __init__ method, but since I took a wrong left turn, I ended
        up in an imperfect world, and therefore giving the Application
        instance to __init__ would mandate that all sub-classes would
        have to deal with that explicitly. That is a lot of unnecessary
        make-work, which we should avoid. Therefore, we do it via this
        method.
        
        The class may access the Application instance via the
        'app' attribute.
        
        N(tapp(RR((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pytset_application-scCs/x|jƒD]}|jƒq
W|jƒdS(sFFind cruft and clean it up.

        This is a helper method.
        N(t	get_crufttcleanuptpost_cleanup(Rtcruft((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pytdo_cleanup_cruft@scCstj|jƒ‚dS(s„Find some cruft in the system.
        
        This method MUST return an iterator (see 'yield' statement).
        This interface design allows cruft to be collected piecemeal,
        which makes it easier to show progress in the user interface.
        
        The base class default implementation of this raises an
        exception. Subclasses MUST override this method.

        N(tcomputerjanitortUnimplementedMethodR	(R((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyR	JscCsdS(súDoes plugin wide cleanup after the individual cleanup
           was performed.
           
           This is useful for stuff that needs to be proccessed
           in batches (e.g. for performance reasons) like package
           removal.
        N((R((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyRXs(t__name__t
__module__t__doc__RRtpropertyRRR
R	R(((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyRs				
	t
PluginManagercBsAeZdZd„Zd„Zd„Zd„Zgdd„ZRS(s›Class to find and load plugins.
    
    Plugins are stored in files named '*_plugin.py' in the list of
    directories given to the initializer.
    
    cCs||_||_d|_dS(N(t_appt_plugin_dirstNonet_plugins(RRtplugin_dirs((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyt__init__ls		cCs³g}x¦|jD]›}tjj|ƒs.qngtj|ƒD]}|jdƒr>|^q>}tjd|dj|ƒfƒ|g|D]}tjj||ƒ^q‰7}qW|S(s4Return all filenames in which plugins may be stored.s
_plugin.pysPlugin modules in %s: %st (	Rtostpathtexiststlistdirtendswithtloggingtdebugtjoin(Rtnamestdirnametxt	basenames((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pytget_plugin_filesqs	0cCs˜g}xKtj|ƒD]:\}}tj|ƒrt|tƒr|j|ƒqqWtjd|djd„|Dƒƒfƒg|D]}|ƒ^q…S(s-Find and instantiate all plugins in a module.sPlugins in %s: %sRcss|]}t|ƒVqdS(N(tstr(t.0R&((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pys	<genexpr>‰s(	tinspectt
getmemberstisclasst
issubclassRtappendR!R"R#(Rtmoduletpluginstdummytmembertplugin((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyt
_find_plugins‚s	!cCs¨tjd|ƒtjjtjj|ƒƒ\}}t|dƒ}y(tj|||ddtj	fƒ}Wn+t
k
r™}tjd||fƒdSX|j
ƒ|S(sLoad a module from a filename.sLoading module %strs.pysFailed to load plugin '%s' (%s)N(R!R"RRtsplitexttbasenametfiletimptload_modulet	PY_SOURCEt	ExceptiontwarningRtclose(Rtfilenametmodule_nameR2tfR0te((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyt_load_moduleŒs$	
c	Cs|jdkr´g|_|jƒ}xtt|ƒƒD]v}|r`||||t|ƒƒn|j||ƒ}x7|j|ƒD]&}|j|jƒ|jj	|ƒqƒWq7Wng|jD]6}|j
|ksî||j
ksî|dkr¾|^q¾}tjd||fƒ|S(s´Return all plugins that have been found.
        
        If callback is specified, it is called after each plugin has
        been found, with the following arguments: filename, index of
        filename in list of files to be examined (starting with 0), and
        total number of files to be examined. The purpose of this is to
        allow the callback to inform the user in case things take a long
        time.
        
        t*s#plugins for condition '%s' are '%s'N(
RRR(trangetlenRDR5RRR/RR!R"(	RRtcallbackt	filenamestiR0R4tpR1((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pytget_plugins›s"		N(	RRRRR(R5RDRRL(((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyRcs			
	(
R:R+R!RRt
setup_gettextt_tobjectRR(((s:/usr/lib/python2.7/dist-packages/computerjanitor/plugin.pyt<module>sJ

Youez - 2016 - github.com/yon3zu
LinuXploit