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
Ú