ó æ ”\c@sddlZddlmZmZddlmZddlmZddl j Z ddl m Z dgZ ejjƒZddd„ƒYZdS( iÿÿÿÿN(t ConfigObjtConfigObjError(t Validator(tTunedException(tcommandst GlobalConfigcBseZdejdejdejdejgZejd„Z ejd„Z d d„Z d d„Z d„Zd d „ZRS( s$dynamic_tuning = boolean(default=%s)s$sleep_interval = integer(default=%s)s%update_interval = integer(default=%s)s'recommend_command = boolean(default=%s)cCs)i|_|jd|ƒtƒ|_dS(Nt file_name(t_cfgt load_configRt_cmd(tselft config_file((s=/usr/lib/python2.7/site-packages/tuned/utils/global_config.pyt__init__s c CsÅtjd|ƒy4t|d|jdtdtdtdtƒ|_WnEtk rj}td|ƒ‚n#t k rŒ}td|ƒ‚nXt ƒ}|jj |d tƒsÁtd |ƒ‚nd S( s& Loads global configuration file. s2reading and parsing global configuration file '%s't configspect raise_errorst file_errort list_valuest interpolations/Global tuned configuration file '%s' not found.s3Error parsing global tuned configuration file '%s'.tcopys2Global tuned configuration file '%s' is not valid.N( tlogtdebugRtglobal_config_spectTruetFalseRtIOErrorRRRtvalidate(R Rtetvdt((s=/usr/lib/python2.7/site-packages/tuned/utils/global_config.pyRs cCs|jj||ƒS(N(Rtget(R tkeytdefault((s=/usr/lib/python2.7/site-packages/tuned/utils/global_config.pyR(scCs,|jj|j||ƒƒdkr(tStS(Nt1(R tget_boolRRR(R RR((s=/usr/lib/python2.7/site-packages/tuned/utils/global_config.pyR +s$cCs||j|s