0x1949 Team - FAZEMRX - MANAGER
Edit File: detect.cpython-310.pyc
o �g� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl m Z dai adZ G dd� de�Zdd � Zd\d d�Zdd � Zdd� Zdd� Zdd� Zdd� Zi e_dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Z d(d)� Z!d]d,d-�Z"d.d/� Z#d0d1� Z$d^d2d3�Z%d_d4d5�Z&d`d6d7�Z'dad8d9�Z(d:d;� Z)d<d=� Z*G d>d?� d?e�Z+d@dA� Z,dBdC� Z-dbdDdE�Z.d\dFdG�Z/dHdI� Z0dJdK� Z1dLdM� Z2dNdO� Z3dPdQ� Z4dRdS� Z5dTdU� Z6dVdW� Z7dXdY� Z8dZd[� Z9dS )czGHardware and driver package detection functionality for Ubuntu systems.� N)�kerneldetection� z/etc/custom_supported_gpus.jsonc @ sH e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dS )�NvidiaPkgNameInfoz%Class to process NVIDIA package namesc C s: || _ d| _d| _d| _d| _d| _d| _| �| j � d S )NF���r )� _pkg_name�_obsolete_name_scheme�_server�_open� _major_ver�_flavour�is_valid� _process_name)�self�pkg_name� r �6/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py�__init__ s zNvidiaPkgNameInfo.__init__c C s� d|vrt �d|� d S t�d�}|�|�}|r*d| _|�d�| _| j| _d| _ d S t�d�}|�|�}|rf|�d�� d�d k| _|�d�� d �d k| _d|�d�| jrVdnd| jr\d ndf | _d| _ d S d S ) N�nvidiaz8NvidiaPkgNameInfo: %s is not an NVIDIA package. Skippingznvidia-([0-9]+)T� znvidia-driver-([0-9]+)(.*)r �-serverr �-openz%s%s%sr ) �logging�debug�re�compile�matchr �groupr r r �findr r )r �name�patternr r r r r ( s, � �zNvidiaPkgNameInfo._process_namec C � | j S �N)r �r r r r �has_obsolete_name_schemeD � z*NvidiaPkgNameInfo.has_obsolete_name_schemec C r r! )r r"