관리-도구
편집 파일: query.cpython-39.pyc
a ����"e�����������������������@���s`���d�dl�mZ�d�dlmZ�d�dlmZ�d�dlmZ�d�dlm Z �G�dd��de �ZG�dd ��d e �Zd S�)�����)�Tracer)�System)�Rules)�Applications)�dump_memoryc�������������������@���s6���e�Zd�ZdZefdd�Zdd��Zdd��Zdd d �ZdS�)�QueryaE�� Provide API for Tracer querying operations. They are executed kind of lazily, so running the operation will return just an wrapper class with ``get()`` method. Example:: from tracer.query import Query q = Query() q.affected_applications().get() .. note:: Some querying methods can require root permissions c�����������������C���s���|t����ttt�|�_d�S��N)r���Zpackage_managerr���r���r����_tracer)�selfZtracer��r����0/usr/lib/python3.9/site-packages/tracer/query.py�__init__+���s����zQuery.__init__c�����������������C���s���||�j�_|�S�)z.List of ``Package`` that only should be traced)r ���Zspecified_packages)r ���Zpackagesr���r���r���� from_packages.���s����zQuery.from_packagesc�����������������C���s���d|�j�_|�S�)z� Pretend that specified packages have been updated just now. Benefit of this is absolutely no need for openning the package history database T)r ����now�r ���r���r���r���r���3���s����z Query.nowNc�����������������C���s���t�|�jjd|i�S�)z? Return list of applications which use some outdated files �user)�Lazyr ���Ztrace_affected)r ���r���r���r���r����affected_applications;���s����zQuery.affected_applications)N) �__name__� __module__�__qualname__�__doc__r���r ���r���r���r���r���r���r���r���r������s ���r���c�������������������@���s���e�Zd�Zdd��Zdd��ZdS�)r���c�����������������C���s���||�_�||�_d�S�r�����_method�_kwargs)r ����method�kwargsr���r���r���r ���C���s����z Lazy.__init__c�����������������C���s���|�j�f�i�|�j��S�r���r���r���r���r���r����getG���s����zLazy.getN)r���r���r���r ���r���r���r���r���r���r���B���s���r���N) Ztracer.resources.tracerr���Ztracer.resources.systemr���Ztracer.resources.rulesr���Ztracer.resources.applicationsr���Ztracer.resources.memoryr����objectr���r���r���r���r���r����<module>���s���(