§ ½@¾jI ãó€—dZddlZddlmZddlmZddlmZddlm Z ddl m Z dd l m Z mZmZd Zdaed „¦«ZdS) a, Config for wizard is not like all other our configs, it can be read and modified in multiple processes at the same time, so we should handle that situations correctly. Thus, we must set up exclusive locks for reading and writing and use contextmanager to load config on start and save right after leaving scope and in case of any errors. You can use config like this: with config.acquire_config_access() as config: options = config.get_options(module) or with config.acquire_config_access() as config: options = config.set_state(module, 'failed') éN)Úcontextmanager)ÚOptional)ÚConfig)ÚMODULES_STATUS_FILE_LOCK)ÚUnableAcquireLockErroré)ÚBaseConfigErrorÚ NoSuchModuleÚMalformedConfigError)r r r Úacquire_config_accessc#óîK—t� tV—dS ttdd¬¦«}n7#ttf$r#}t t |¦«¬¦«|‚d}~wwxYwtj|tj ¦« t¦«atV— tdupt  ¦«datj|tj ¦«dS#datj|tj ¦«wxYw# tdupt  ¦«datj|tj ¦«w#datj|tj ¦«wxYwxYw)NÚwzutf-8)Úencoding)Ú error_message) Ú_configÚopenrÚIOErrorÚOSErrorrÚstrÚfcntlÚflockÚLOCK_EXrÚsaveÚLOCK_UN)Ú lock_fileÚes úpy/clwizard/config/__init__.pyr r Fs^èè€õÐ݈ ˆ ˆ ؈ðBÝÕ1°3ÀÐIÑIÔIˆ ˆ øÝ •WÐ ðBðBðBÝ$µ3°q±6´6Ð:Ñ:Ô:ÀÐAøøøøðBøøøõ „K� �5œ=Ñ)Ô)Ð)ð 2Ý‘(”(ˆÝˆ ˆ ˆ ð 2å �tˆOÐ -�wŸ|š|™~œ~øàˆGÝ ŒK˜ ¥5¤=Ñ 1Ô 1Ð 1Ð 1Ð 1øðˆGÝ ŒK˜ ¥5¤=Ñ 1Ô 1Ð 1Ð 1øøøøð  2å �tˆOÐ -�wŸ|š|™~œ~øàˆGÝ ŒK˜ ¥5¤=Ñ 1Ô 1Ð 1Ð 1øðˆGÝ ŒK˜ ¥5¤=Ñ 1Ô 1Ð 1Ð 1øøøøøøsD–.®A"¿AÁA"ÂDÂ"C"Ã"#DÄE4Ä "EÄ,"E4Å#E1Å1E4)Ú__doc__rÚ contextlibrÚtypingrÚclwizard.config.configrÚclwizard.constantsrÚclwizard.config.exceptionsrÚ exceptionsr r r Ú__all__rr ©órúr(sÙðððð  € € € Ø%Ð%Ð%Ð%Ð%Ð%àÐÐÐÐÐà)Ð)Ð)Ð)Ð)Ð)Ø7Ð7Ð7Ð7Ð7Ð7Ø=Ð=Ð=Ð=Ð=Ð=ððððððððððð  €ð8 €ðð2ð2ñ„ð2ð2ð2r'