![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/UbuntuDrivers/__pycache__/ |
o �g� � @ s8 d dl Z d dlZd dlZd dlmZ G dd� de�ZdS )� N)�Popenc @ sV e Zd Zddd�Zdd� Zdd� Zdd � Zd d� Zdd � Zdd� Z dd� Z dd� ZdS )�KernelDetectionNc C sF |r || _ t�|�| _d S t�� t�� t�d �| _ t�|�| _d S �N)� apt_cache�apt_pkg�DepCache�apt_depcache�init_config�init_system�Cache)�self�cache� r �?/usr/lib/python3/dist-packages/UbuntuDrivers/kerneldetection.py�__init__ s zKernelDetection.__init__c C s� t �d�}|�|�}|�|�}|r)d|�d�|�d�f }d|�d�|�d�f }t�d||f � d||f }t|�d��}|�� |j S )Nz(.+)-([0-9]+)-(.+)�%s-%s� � zComparing %s with %sz dpkg --compare-versions %s gt %s� ) �re�compile�match�group�logging�debugr �split�communicate� returncode)r �term1�term2�pattern�match1�match2�command�processr r r �_is_greater_than* s"