404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.145.54.136: ~ $
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

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 90 B 0644
device_matcher.py File 1.54 KB 0644
device_matcher_udev.py File 529 B 0644
inventory.py File 3.8 KB 0644