%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/landscape/lib/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/landscape/lib/__pycache__/bpickle.cpython-312.pyc

�

�~�e����dZddlmZddlmZiZiZefd�Zedfd�Zd�Zd�Z	d	�Z
d
�Zd�Zefd�Z
efd
�Zefd�Zd�Zdd�Zdd�Zdd�Zdd�Zdd�Zedfd�Zedfd�Zedfd�Zdd�Zej5eeee	ee
ee
eee ee!d�ee"ei�ej5eeeeeeeeed�	�e"e#urej5e$eee	i�yej5e#ei�y)a�
Copyright (c) 2006, Gustavo Niemeyer <gustavo@niemeyer.net>
Port to python 3 was done by Chris Glass <chris.glass@canonical.com>

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of the copyright holder nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file is modified from the original to work with python3, but should be
wire compatible and behave the same way (bugs notwithstanding).
�)�_PY3)�longc�j�	|t|�|�S#t$r}td|����d}~wwxYw)NzUnsupported type: )�type�KeyError�
ValueError)�obj�_dt�es   �7/usr/lib/python3/dist-packages/landscape/lib/bpickle.py�dumpsr
)s?��3��s�4��9�~�c�"�"���3��-�a�S�1�2�2��3�s��	2�-�2Fc��|std��	||dd|d|��dS#t$r}td|����d}~wt$rtd��wxYw)z�Load a serialized byte_string.

    @param byte_string: the serialized data
    @param _lt: the conversion map
    @param as_is: don't reinterpret dict keys as str
    zCan't load empty stringr���as_iszUnknown type character: NzCorrupted data)rr�
IndexError)�byte_string�_ltrrs    r�loadsr0ss����2�3�3�+�%�s�;�q��#�$�[�!�5�A�!�D�D���9��3�A�3�7�8�8���+��)�*�*�+�s�#�	A�:�Ac�>�dt|�d��jd�S)N�b�d�utf-8)�int�encode�r	s r�
dumps_boolrCs ����C���|��$�$�W�-�-�c�.�d|d�d�jd�S)N�ir�;r�rrs r�	dumps_intr#Gs����A�w�a�L� � ��)�)rc�,�d|�d�jd�S)N�fr!rr"rs r�dumps_floatr&Ks����w�a�L� � ��)�)rc�F�dt|�d�d�jd�|zS)N�sr�:r)�lenrrs r�dumps_bytesr+Os'����C���|�1��%�%�g�.��4�4rc�f�|jd�}dt|�d�d|��jd�S)Nr�urr))rr*)r	�bobjs  r�
dumps_unicoder/Ss4���:�:�g��D���D�	�!�}�A�c�U�#�+�+�G�4�4rc�z�ddj|D�cgc]}|t|�|���c}�zdzScc}w)N�lr�;��joinr�r	r
�vals   r�
dumps_listr7X�8���#�(�(�3�?�C�N�C��S�	�N�3�/�?�@�@�4�G�G��?��8
c�z�ddj|D�cgc]}|t|�|���c}�zdzScc}w)N�trr2r3r5s   r�dumps_tupler<\r8r9c��t|j��}|j�g}|j}|D];}||}||t	|�|��||t	|�|���=ddj|�zdzS)N�drr2)�list�keys�sort�appendrr4)r	r
r@�resrB�keyr6s       r�
dumps_dictrE`s�������
��D��I�I�K�
�C�
�Z�Z�F��$���#�h���~�s�4��9�~�c�"�#��~�s�4��9�~�c�"�#�$��#�(�(�3�-��$�&�&rc��y)N�n�rs r�
dumps_nonerIls��rc�F�tt||dz|dz��|dzfS)Nr�)�boolr)�
bytestring�posrs   r�
loads_boolrOps*����J�s�Q�w��q��1�2�3�S�1�W�<�<rc�R�|jd|�}t||dz|�|dzfS�Nr2r)�indexr�rMrNr�endposs    r�	loads_intrUts3��
�
�
�d�C�
(�F��z�#��'�F�+�,�f�q�j�8�8rc�R�|jd|�}t||dz|�|dzfSrQ)rR�floatrSs    r�loads_floatrXys3��
�
�
�d�C�
(�F���C�!�G�f�-�.���
�:�:rc��|jd|�dz}t||dz|dz
�}|dkrtd|����||z}||||fS)N�:rrzNegative bytestring length: )rRrr�rMrNr�startpos�steprTs      r�loads_bytesr^~sg������c�*�Q�.�H��z�#��'�H�q�L�1�2�D��a�x��7��v�>�?�?�
��_�F��h�v�&��.�.rc��|jd|�dz}t||dz|dz
�}|dkrtd|����||z}|||jd�|fS)NrZrrzNegative unicode length: r)rRrr�decoder[s      r�
loads_unicodera�sr������c�*�Q�.�H��z�#��'�H�q�L�1�2�D��a�x��4�T�F�;�<�<�
��_�F��h�v�&�-�-�g�6��>�>rc��|dz
}g}|j}|||dzdk7r+||||dz|||��\}}||�|||dzdk7r�+||dzfS�Nrr2r)rB�rMrNrrrCrBr	s       r�
loads_listre�s|���1�H�C�
�C�
�Z�Z�F�
�S�3��7�
#�t�
+�1�3�z�#��a��0�1�*�c��O���S��s���S�3��7�
#�t�
+���a��<�rc��|dz
}g}|j}|||dzdk7r+||||dz|||��\}}||�|||dzdk7r�+t|�|dzfSrc)rB�tuplerds       r�loads_tuplerh�s����1�H�C�
�C�
�Z�Z�F�
�S�3��7�
#�t�
+�1�3�z�#��a��0�1�*�c��O���S��s���S�3��7�
#�t�
+���:�s�Q�w��rc��|dz
}i}|||dzdk7rh||||dz|||��\}}||||dz|||��\}}tr#|s!t|t�r|jd�}|||<|||dzdk7r�h||dzfS)Nrr2r�ascii)r�
isinstance�bytesr`)rMrNrrrCrDr6s       r�
loads_dictrm�s����1�H�C�
�C�
�S�3��7�
#�t�
+�1�3�z�#��a��0�1�*�c��O���S�1�3�z�#��a��0�1�*�c��O���S���*�S�%�"8��*�*�W�%�C���C���S�3��7�
#�t�
+���a��<�rc��d|dzfS)NrrH)�strrNrs   r�
loads_nonerp�s����q��=�rN)	�b�i�fr1r;r>rG�s�u)F)%�__doc__�landscape.lib.compatrr�dumps_table�loads_tabler
rrr#r&r+r/r7r<rErIrOrUrXr^rarerhrmrp�updaterLrrWr?rg�dictrrlro�unicoderHrr�<module>r}sf�� �B&�%������3�'�e�+�&.�*�*�5�5�
$�H�%�H�$�	'��=�9�
;�
/�?�%0�u��&1���%0�u�������j��Y�
�{��j�
�{��j��T�
�J�
�{�	��������������
��	�C�<�����]��)�	
�������	
�r

Zerion Mini Shell 1.0