| Server IP : 104.21.25.182 / Your IP : 216.73.216.38 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.9/site-packages/tracer/__pycache__/ |
Upload File : |
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 (