a ì)gh ã@srddlmZmZmZeZddlZddlZddlm Z ddl m Z ddl m Z mZdZGdd„de ƒZed d �ZdS) é)Úabsolute_importÚdivisionÚprint_functionN)ÚMutableMapping)ÚPY3)Úto_bytesÚto_text)Úenvironc@sBeZdZdZddd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dS)Ú _TextEnvironzŽ Utility class to return text strings from the environment instead of byte strings Mimics the behaviour of os.environ on Python3 NcCs8|durtj}||_i|_|dur.t ¡|_n||_dS©N)Úosr Ú _raw_environÚ _value_cacheÚsysÚgetfilesystemencodingÚencoding)ÚselfÚenvr©rú;/usr/lib/python3.9/site-packages/ansible/utils/py3compat.pyÚ__init__s z_TextEnviron.__init__cCs |j|=dSr )r )rÚkeyrrrÚ __delitem__-sz_TextEnviron.__delitem__cCs>|j|}tr|S||jvr4t||jddd�|j|<|j|S)NZpassthruÚsurrogate_or_strict©rZ nonstringÚerrors)r rrrr©rrÚvaluerrrÚ __getitem__0s  ÿ z_TextEnviron.__getitem__cCst||jddd�|j|<dS)NÚstrictrr)rrr rrrrÚ __setitem__;s ÿz_TextEnviron.__setitem__cCs |j ¡Sr )r Ú__iter__©rrrrr!?sz_TextEnviron.__iter__cCs t|jƒSr )Úlenr r"rrrÚ__len__Bsz_TextEnviron.__len__)NN) Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrr r!r$rrrrr s  r zutf-8)r)Z __future__rrrÚtypeZ __metaclass__r rÚcollections.abcrZansible.module_utils.sixrZansible.module_utils._textrrÚ__all__r r rrrrÚ s  -