관리-도구
편집 파일: function_assertion.cpython-36.opt-1.pyc
3 �<�e� � @ sT d dl Z d dlZddlmZ d dlmZ d dlmZ ej j � ZG dd� dej�Z dS )� N� )�base)�commands)�InvalidProfileExceptionc s, e Zd ZdZ� fdd�Z� fdd�Z� ZS )� assertionz� Assertion: compares argument 2 with argument 3. If they don't match it logs text from argument 1 and throws InvalidProfileException. This exception will abort profile loading. c s t t| �jddd� d S )Nr � )�superr �__init__)�self)� __class__� �(/usr/lib/python3.6/function_assertion.pyr s zassertion.__init__c sX t t| �j|�sd S |d |d krTtjd|d |d |d f � td|d ��d S )Nr � z#assertion '%s' failed: '%s' != '%s'r zAssertion '%s' failed.)r r �execute�log�errorr )r �args)r r r r s zassertion.execute)�__name__� __module__�__qualname__�__doc__r r � __classcell__r r )r r r s r )�osZ tuned.logsZtuned� r Ztuned.utils.commandsr Ztuned.profiles.exceptionsr Zlogs�getr ZFunctionr r r r r �<module> s