o x[hþã@sddlZGdd„dƒZdS)éNc@s>eZdZdZdd„Zdd„Zdd„Zdd d „Zed d „ƒ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Ús