Submit
Path:
~
/
/
usr
/
lib
/
python3.6
/
site-packages
/
tuned
/
hardware
/
File Content:
device_matcher_udev.py
from . import device_matcher import re __all__ = ["DeviceMatcherUdev"] class DeviceMatcherUdev(device_matcher.DeviceMatcher): def match(self, regex, device): """ Match a device against the udev regex in tuning profiles. device is a pyudev.Device object """ properties = '' try: items = device.properties.items() except AttributeError: items = device.items() for key, val in sorted(list(items)): properties += key + '=' + val + '\n' return re.search(regex, properties, re.MULTILINE) is not None
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
__pycache__
---
0755
__init__.py
90 bytes
0644
device_matcher.py
1576 bytes
0644
device_matcher_udev.py
529 bytes
0644
inventory.py
3891 bytes
0644
N4ST4R_ID | Naxtarrr