$50 GRAYBYTE WORDPRESS FILE MANAGER $47

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/usr/lib/python3.6/site-packages/tuned/hardware/__pycache__/

HOME
Current File : /usr/lib/python3.6/site-packages/tuned/hardware/__pycache__//device_matcher.cpython-36.pyc
3

�<�e(�@s*ddlZddlZdgZGdd�de�ZdS)�N�
DeviceMatcherc@s eZdZdZdd�Zdd�ZdS)ra,
	Device name matching against the devices specification in tuning profiles.

	The devices specification consists of multiple rules separated by spaces.
	The rules have a syntax of shell-style wildcards and are either positive
	or negative. The negative rules are prefixed with an exclamation mark.
	cs�t|t�rtjd|�}dd�|D���fdd�|D�}t��dkrL�jd�d}x�D]}tj||�rVd}PqVWx|D]}tj||�rvd}PqvW|S)	a
		Match a device against the specification in the profile.

		If there is no positive rule in the specification, implicit rule
		which matches all devices is added. The device matches if and only
		if it matches some positive rule, but no negative rule.
		z\s|,\s*cSs*g|]"}|jd�r|j�dkr|�qS)�!�)�
startswith�strip)�.0�rule�r	�$/usr/lib/python3.6/device_matcher.py�
<listcomp>sz'DeviceMatcher.match.<locals>.<listcomp>cs g|]}|�kr|dd��qS)�Nr	)rr)�positive_rulesr	r
rsr�*FT)�
isinstance�str�re�split�len�append�fnmatch)�self�rulesZdevice_nameZnegative_rulesZmatchesrr	)r
r
�matchs 



zDeviceMatcher.matchcCs,g}x"|D]}|j||�r
|j|�q
W|S)z�
		Match a device list against the specification in the profile. Returns
		the list, which is a subset of devices which match.
		)rr)rrZdevice_listZmatching_devicesZdevicer	r	r
�
match_list,s

zDeviceMatcher.match_listN)�__name__�
__module__�__qualname__�__doc__rrr	r	r	r
rs)rr�__all__�objectrr	r	r	r
�<module>s


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
13 Mar 2025 8.42 AM
root / root
0755
__init__.cpython-36.opt-1.pyc
0.191 KB
11 Mar 2025 7.42 AM
root / root
0644
__init__.cpython-36.pyc
0.191 KB
11 Mar 2025 7.42 AM
root / root
0644
device_matcher.cpython-36.opt-1.pyc
1.938 KB
11 Mar 2025 7.42 AM
root / root
0644
device_matcher.cpython-36.pyc
1.938 KB
11 Mar 2025 7.42 AM
root / root
0644
device_matcher_udev.cpython-36.opt-1.pyc
0.816 KB
11 Mar 2025 7.42 AM
root / root
0644
device_matcher_udev.cpython-36.pyc
0.816 KB
11 Mar 2025 7.42 AM
root / root
0644
inventory.cpython-36.opt-1.pyc
4.1 KB
11 Mar 2025 7.42 AM
root / root
0644
inventory.cpython-36.pyc
4.1 KB
11 Mar 2025 7.42 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF