/usr/lib/python3.9/site-packages/tuned/ppd/__pycache__
NameSizeModeActions
config.cpython-39.opt-1.pyc49630644editdlrm
config.cpython-39.pyc49630644editdlrm
controller.cpython-39.opt-1.pyc197800644editdlrm
controller.cpython-39.pyc197800644editdlrm
Edit: /usr/lib/python3.9/site-packages/tuned/ppd/__pycache__/config.cpython-39.pyc (4963B)
a Á]›i²ã@shddlmZmZddlmZddlZdZdZdZdZ dZ d Z d Z d Z d ZGd d„dƒZGdd„dƒZdS)é)Ú ConfigParserÚError)ÚTunedExceptionNz power-saverZbalancedZ performanceÚmainÚprofilesZbatteryÚdefaultÚbattery_detectionÚsysfs_acpi_monitorc@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„Z dS)Ú 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. )Ú_sysfs_acpi_monitorrrrrr MszPPDConfig.sysfs_acpi_monitorcCs2tƒ}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Ú Žóz,PPDConfig.load_from_file..TN) 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$ÚSYSFS_ACPI_MONITOR_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Ús