[ Root System Explorer ]
Location:
Root
/
proc
/
thread-self
/
root
/
lib
/
python3.9
/
site-packages
/
tuned
/
hardware
+ Folder
+ File
Upload
Editing: 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: try: items = device.items() except AttributeError: return False for key, val in sorted(list(items)): properties += key + '=' + val + '\n' return re.search(regex, properties, re.MULTILINE) is not None
SAVE CHANGES
[ CANCEL ]
Name
Type
Actions
.. (Parent Directory)
📄 __init__.py
FILE
Ren
[EDIT]
DEL
📁 __pycache__/
DIR
Ren
DEL
📄 device_matcher.py
FILE
Ren
[EDIT]
DEL
📄 device_matcher_udev.py
FILE
Ren
[EDIT]
DEL
📄 inventory.py
FILE
Ren
[EDIT]
DEL