3 À<×eóã@s<ddlZddlZddlmZejjƒZGdd„dejƒZ dS)éNé)Úbasecs,eZdZdZ‡fdd„Z‡fdd„Z‡ZS)Ú cpuinfo_checkaª Checks regexes against /proc/cpuinfo. Accepts arguments in the following form: REGEX1, STR1, REGEX2, STR2, ...[, STR_FALLBACK] If REGEX1 matches something in /proc/cpuinfo it expands to STR1, if REGEX2 matches it expands to STR2. It stops on the first match, i.e. if REGEX1 matches, no more regexes are processed. If none regex matches it expands to STR_FALLBACK. If there is no fallback, it expands to empty string. cstt|ƒjdddƒdS)Nrré)ÚsuperrÚ__init__)Úself)Ú __class__©ú,/usr/lib/python3.6/function_cpuinfo_check.pyrszcpuinfo_check.__init__cs†tt|ƒj|ƒsdS|jjdƒ}xHtdt|ƒdƒD]4}|dt|ƒkr2tj|||tj ƒr2||dSq2Wt|ƒdr~|dSdSdS)Nz /proc/cpuinforrrÚéÿÿÿÿ) rrÚexecuteZ_cmdZ read_fileÚrangeÚlenÚreÚsearchÚ MULTILINE)rÚargsZcpuinfoÚi)r r r rs  zcpuinfo_check.execute)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrÚ __classcell__r r )r r rs  r) rZ tuned.logsZtunedr rZlogsÚgetÚlogZFunctionrr r r r Ús