Mini Shell

Direktori : /lib/python3.6/site-packages/blivet/tasks/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/blivet/tasks/__pycache__/fsinfo.cpython-36.pyc

3

{)c
�@s�ddlZddlmZddlmZddlmZddlmZddlmZdd	lm	Z	eej
�Gd
d�de	jej��Z
Gdd
�d
e
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�dej�ZdS)�N)�
add_metaclass�)�FSError)�util�)�availability)�fstask)�taskc@s4eZdZdZdZejdd�Zedd��Z	dd�Z
d	S)
�FSInfozA An abstract class that represents an information gathering app. zfilesystem infoz%Options for invoking the application.)�doccCst|j�g|j|jjgS)z� Returns the command for reading filesystem information.

            :returns: a list of appropriate options
            :rtype: list of str
        )�str�ext�optionsZfsZdevice)�self�r�/usr/lib/python3.6/fsinfo.py�
_info_command,szFSInfo._info_commandcCsx|j}|rtdj|���d}y tj|j�\}}|r:d|}Wn*tk
rf}zd|}WYdd}~XnX|rtt|��|S)z� Returns information from the command.

            :returns: a string representing the output of the command
            :rtype: str
            :raises FSError: if info cannot be obtained
        �
Nzfailed to gather fs info: %s)Zavailability_errorsr�joinrZrun_program_and_capture_outputr�OSError)rZ
error_msgsZ	error_msgZrc�out�errr�do_task5szFSInfo.do_taskN)�__name__�
__module__�__qualname__�__doc__�description�abc�abstractpropertyr�propertyrrrrrrr
"s	r
c@seZdZejZdgZdS)�
Ext2FSInfoz-hN)rrrrZDUMPE2FS_APPr
rrrrrr!Lsr!c@seZdZejZdgZdS)�JFSInfoz-lN)rrrrZJFSTUNE_APPr
rrrrrr"Qsr"c@seZdZejZdgZdS)�NTFSInfoz-mN)rrrrZNTFSINFO_APPr
rrrrrr#Vsr#c@seZdZejZgZdS)�ReiserFSInfoN)rrrrZDEBUGREISERFS_APPr
rrrrrr$[sr$c@s$eZdZejZdddddddgZdS)�XFSInfoz-czsb 0z	p dblockszp blocksizez-rN)rrrrZ	XFSDB_APPr
rrrrrr%`sr%c@seZdZdS)�UnimplementedFSInfoN)rrrrrrrr&esr&)rZsixr�errorsr�rrrr	�ABCMetaZBasicApplicationZFSTaskr
r!r"r#r$r%ZUnimplementedFSTaskr&rrrr�<module>s)