\c@sddlZddlmZmZddlmZddlmZddl j Z ddl m Z dgZ ejjZdddYZdS( iN(t ConfigObjtConfigObjError(t Validator(tTunedException(tcommandst GlobalConfigcBseZdejdejdejdejgZejdZ ejdZ d dZ d dZ dZd 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 Cstjd|y4t|d|jdtdtdtdt|_WnEtk rj}td|n#t k r}td|nXt }|jj |d tstd |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