o
    JPZ                     @   s8   d dl mZ d dlmZ d dlmZ G dd deZdS )    )AbstractSearcher)debug)errorc                   @   s*   e Zd ZdZdd Zdd Zd
ddZd	S )StubSearcherzKFigures out if given MIB module is present in a fixed list of modules.
    c                 G   s
   || _ dS )zCreate an instance of *StubSearcher* initialized with a fixed list
           or MIB modules names.

           Args:
               mibnames (str): blacklisted MIB names
        N)	_mibnames)selfZmibnames r   5/usr/lib/python3/dist-packages/pysmi/searcher/stub.py__init__   s   
zStubSearcher.__init__c                 C   s   d| j j S )Nz%s)	__class____name__)r   r   r   r	   __str__   s   zStubSearcher.__str__Fc                 C   s   || j v r1tjtj@ o!td|  tjd|d| j f | d tjd|d| j f | dtjd|d| j f | d)Nz*pretend compiled %s exists and is very newzcompiled file %s is among %sz, )Zsearcherz"no compiled file %s found among %s)r   r   loggerZflagSearcherr   ZPySmiFileNotModifiedErrorjoinZPySmiFileNotFoundError)r   ZmibnamemtimeZrebuildr   r   r	   
fileExists   s   
zStubSearcher.fileExistsN)F)r   
__module____qualname____doc__r
   r   r   r   r   r   r	   r      s
    	r   N)Zpysmi.searcher.baser   Zpysmir   r   r   r   r   r   r	   <module>   s   