
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
<e                 @   sT   d dl Z d dlZddlmZ d dlmZ d dlmZ ej	j
 ZG dd dejZdS )    N   )base)commands)InvalidProfileExceptionc                   s,   e Zd ZdZ fddZ fddZ  ZS )	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| jddd d S )Nr      )superr   __init__)self)	__class__ (/usr/lib/python3.6/function_assertion.pyr	      s    zassertion.__init__c                sX   t t| j|sd S |d |d krTtjd|d |d |d f  td|d  d S )Nr      z#assertion '%s' failed: '%s' != '%s'r   zAssertion '%s' failed.)r   r   executelogerrorr   )r
   args)r   r   r   r      s     zassertion.execute)__name__
__module____qualname____doc__r	   r   __classcell__r   r   )r   r   r   	   s   r   )osZ
tuned.logsZtuned r   Ztuned.utils.commandsr   Ztuned.profiles.exceptionsr   Zlogsgetr   ZFunctionr   r   r   r   r   <module>   s   
