3 À<×eSã@s>ddlZddlZddlmZddlmZGdd„dejƒZdS)éNé)Úbase)Úcommandscs,eZdZdZ‡fdd„Z‡fdd„Z‡ZS)Ú virt_checkz§ 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). cstt|ƒjdddƒdS)Nré)ÚsuperrÚ__init__)Úself)Ú __class__©ú)/usr/lib/python3.6/function_virt_check.pyr szvirt_check.__init__csJtt|ƒj|ƒsdS|jjdgƒ\}}|dkrBt|ƒdkrB|dS|dS)Nz virt-whatrr)rrÚexecuteZ_cmdÚlen)r ÚargsÚretÚout)r r r r s zvirt_check.execute)Ú__name__Ú __module__Ú __qualname__Ú__doc__rr Ú __classcell__r r )r r rs r) ÚosZ tuned.logsZtunedÚrZtuned.utils.commandsrZFunctionrr r r r Ús