HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-86-generic #87-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 18:03:36 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //snap/core18/current/usr/lib/python3/dist-packages/cloudinit/__pycache__/registry.cpython-36.pyc
3

�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|j�dS)N)�reset)�self�r�4/usr/lib/python3/dist-packages/cloudinit/registry.py�__init__szDictRegistry.__init__cCs
i|_dS)N)�_items)rrrrrszDictRegistry.resetcCs&||jkrtdj|���||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(||jkr|j|=n|s$td|��dS)zRemove item from the registry.z!%s: key not present to unregisterN)r�KeyError)rrZforcerrr�unregister_items

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

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