HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/cloudinit/__pycache__/registry.cpython-310.pyc
o

�Ad�@sddlZGdd�d�ZdS)�Nc@s>eZdZdZdd�Zdd�Zdd�Zdd	d
�Zedd��Z	d
S)�DictRegistryz+A simple registry for a mapping of objects.cCs|��dS�N)�reset��self�r�4/usr/lib/python3/dist-packages/cloudinit/registry.py�__init__szDictRegistry.__init__cCs
i|_dSr)�_itemsrrrrrs
zDictRegistry.resetcCs&||jvrtd�|���||j|<dS)zAdd item to the registry.z$Item already registered with key {0}N)r
�
ValueError�format)r�key�itemrrr�
register_items

�zDictRegistry.register_itemTcCs*||jvr|j|=dS|std|��dS)zRemove item from the registry.z!%s: key not present to unregisterN)r
�KeyError)rr
�forcerrr�unregister_items

�zDictRegistry.unregister_itemcCst�|j�S)zvAll the items that have been registered.

        This cannot be used to modify the contents of the registry.
        )�copyr
rrrr�registered_items szDictRegistry.registered_itemsN)T)
�__name__�
__module__�__qualname__�__doc__r	rrr�propertyrrrrrrs
r)rrrrrr�<module>s