o
    •Û_	  ã                   @   s0   d dl mZ ddlZdgZG dd„ dejƒZdS )é   )Údevice_matcheré    NÚDeviceMatcherUdevc                   @   s   e Zd Zdd„ ZdS )r   c                 C   sh   d}z|j  ¡ }W n ty   | ¡ }Y nw t|ƒD ]\}}||d | d 7 }qt ||tj¡duS )zc
		Match a device against the udev regex in tuning profiles.

		device is a pyudev.Device object
		Ú ú=Ú
N)Ú
propertiesÚitemsÚAttributeErrorÚlistÚreÚsearchÚ	MULTILINE)ÚselfÚregexÚdevicer   r	   ÚkeyÚval© r   úD/usr/lib/python3/dist-packages/tuned/hardware/device_matcher_udev.pyÚmatch   s   ÿzDeviceMatcherUdev.matchN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s    )r   r   r   Ú__all__ÚDeviceMatcherr   r   r   r   r   Ú<module>   s    