Mini Shell

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

3

{)c_�@s�ddlZddlmZeej�Gdd�de��ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�Z	Gd
d�de�Z
Gdd�de�ZGdd�de�ZdS)�N)�
add_metaclassc@s.eZdZdZeejdd���Zedd��ZdS)�FSUUIDzVAn abstract class that represents filesystem actions for setting the
       UUID.
    cCst�dS)z�Returns True if the given UUID is correctly formatted for
           this filesystem, otherwise False.

           :param str uuid: the UUID for this filesystem
           :rtype: bool
        N)�NotImplementedError)�cls�uuid�r�/usr/lib/python3.6/fsuuid.py�uuid_format_ok
s	zFSUUID.uuid_format_okcCs:|jd�}t|�dkrdSdd�|D�}|dddddgkS)	z�Check whether the given UUID is correct according to RFC 4122 and
           return True if it's correct or False otherwise.

           :param str uuid: the UUID to check
           :rtype: bool
        �-�FcSs&g|]}tdd�|D��rt|��qS)css|]}|dkVqdS)Z0123456789abcdefNr)�.0�charrrr�	<genexpr>&sz8FSUUID._check_rfc4122_uuid.<locals>.<listcomp>.<genexpr>)�all�len)r�chunkrrr�
<listcomp>%sz.FSUUID._check_rfc4122_uuid.<locals>.<listcomp>���)�splitr)rrZchunksZ	chunklensrrr�_check_rfc4122_uuids

zFSUUID._check_rfc4122_uuidN)	�__name__�
__module__�__qualname__�__doc__�classmethod�abc�abstractmethodr	rrrrrrsrc@seZdZedd��ZdS)�
Ext2FSUUIDcCs
|j|�S)N)r)rrrrrr	+szExt2FSUUID.uuid_format_okN)rrrrr	rrrrr*src@seZdZedd��ZdS)�	FATFSUUIDcCsBt|�dks|ddkrdStdd�|dd�|dd�D��S)N�	rr
Fcss|]}|dkVqdS)�0123456789ABCDEFNr)rr
rrrr5sz+FATFSUUID.uuid_format_ok.<locals>.<genexpr>r)rr)rrrrrr	1szFATFSUUID.uuid_format_okN)rrrrr	rrrrr 0sr c@seZdZedd��ZdS)�JFSUUIDcCs
|j|�S)N)r)rrrrrr	:szJFSUUID.uuid_format_okN)rrrrr	rrrrr#9sr#c@seZdZedd��ZdS)�ReiserFSUUIDcCs
|j|�S)N)r)rrrrrr	@szReiserFSUUID.uuid_format_okN)rrrrr	rrrrr$?sr$c@seZdZedd��ZdS)�XFSUUIDcCs
|j|�S)N)r)rrrrrr	FszXFSUUID.uuid_format_okN)rrrrr	rrrrr%Esr%c@seZdZedd��ZdS)�HFSPlusUUIDcCs
|j|�S)N)r)rrrrrr	LszHFSPlusUUID.uuid_format_okN)rrrrr	rrrrr&Ksr&c@seZdZedd��ZdS)�NTFSUUIDcCs"t|�dkrdStdd�|D��S)N�Fcss|]}|dkVqdS)r"Nr)rr
rrrrVsz*NTFSUUID.uuid_format_ok.<locals>.<genexpr>)rr)rrrrrr	RszNTFSUUID.uuid_format_okN)rrrrr	rrrrr'Qsr')
rZsixr�ABCMeta�objectrrr r#r$r%r&r'rrrr�<module>s#