| Server IP : 162.144.4.212 / Your IP : 216.73.216.108 Web Server : Apache System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64 User : cozeellc ( 2980) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.9/site-packages/tuned/utils/__pycache__/ |
Upload File : |
a
�]�i � @ s4 d dl Zd dlZdgZej�� ZG dd� de�ZdS )� N�ClassLoaderc sD e Zd Zg d�Zdd� Z� fdd�Zdd� Zdd � Zd
d� Z� Z S )r )�
_namespace�_prefix�
_interfacec C s
t � �dS )z~
This method has to be implemented in child class and should
set _namespace, _prefix, and _interface member attributes.
N)�NotImplementedError��self� r �</usr/lib/python3.9/site-packages/tuned/utils/class_loader.py�_set_loader_parameters s z"ClassLoader._set_loader_parametersc sn t t| ��� d | _d | _d | _| �� t| j�tu s:J �t| j�tu sLJ �t| j�tu rft | jt
�sjJ �d S )N)�superr �__init__r r r r �type�str�
issubclass�objectr �� __class__r r
r
s zClassLoader.__init__c C s, t |�tu sJ �d| j| j|f }| �|�S )Nz%s.%s%s)r r r r �
_get_class)r �
class_name�module_namer r r
�
load_class s zClassLoader.load_classc C s� t �d| � t|�}|�d�}|�d� t|�dkrHt||�d��}q*|jD ].}t||�}t|�tu rNt || j
�rN| S qNtd| ��d S )Nzloading module %s�.r zCannot find the class %s.)�log�debug�
__import__�split�pop�len�getattr�__dict__r r r �ImportError)r r �module�path�name�clsr r r
r "