Edit File: function_cpulist_present.cpython-36.pyc
3 �<�e� � @ sH d dl Z d dlZddlmZ d dlmZ ejj� Z G dd� dej �ZdS )� N� )�base)�commandsc s, e Zd ZdZ� fdd�Z� fdd�Z� ZS )�cpulist_presentzY Checks whether CPUs from list are present, returns list containing only present CPUs c s t t| �jdd� d S )Nr r )�superr �__init__)�self)� __class__� �./usr/lib/python3.6/function_cpulist_present.pyr s zcpulist_present.__init__c sd t t| �j|�sd S | jjdj|��}| jj| jjd��}djdd� ttt |�j t |����D ��S )Nz,,z/sys/devices/system/cpu/present�,c s s | ]}t |�V qd S )N)�str)�.0�vr r r � <genexpr> s z*cpulist_present.execute.<locals>.<genexpr>)r r �executeZ_cmdZcpulist_unpack�joinZ read_file�sorted�list�set�intersection)r �argsZcpusZpresent)r r r r s zcpulist_present.execute)�__name__� __module__�__qualname__�__doc__r r � __classcell__r r )r r r s r )�osZ tuned.logsZtuned� r Ztuned.utils.commandsr Zlogs�get�logZFunctionr r r r r �<module> s
Back to File Manager