ó ħ2öYc@sQddlZddlZddlZddlmZdejfd„ƒYZdS(i˙˙˙˙N(tcommandst virt_checkcBs eZdZd„Zd„ZRS(s§ Checks whether running inside virtual machine (VM) or on bare metal. If running inside VM expands to argument 1, otherwise expands to argument 2 (even on error). cCs t|j|ƒjddƒdS(NRi(tsupert __class__t__init__(tself((sP/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_virt_check.pyR scCsht|j|ƒj|ƒsdS|jjdgƒ\}}|dkr`t|ƒdkr`|dS|dS(Ns virt-whatii(RRtexecutetNonet_cmdtlen(Rtargstrettout((sP/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_virt_check.pyRs (t__name__t __module__t__doc__RR(((sP/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_virt_check.pyRs (tost tuned.logsttunedtbasettuned.utils.commandsRtFunctionR(((sP/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_virt_check.pyts