U
    Ubi                     @   sV   d dl mZ d dlZd dlZejdkr,dZndZeejdddeZd	d
 Z	d
gZ
dS )    )print_functionN3gettextZugettextzcommand-not-foundT)Zfallbackc                 C   sP  z<z|   W n* tk
r: } zttdt jd t|t jd ttdt jd tt jd ttd| t jd ttdt j t jd z&ddl}|jd	d
dddgt jd W n t	t
fk
r   Y nX ttdt jd tt jd t|t jd zddl}|  W n t	k
r(   Y nX W 5 d}~X Y nX W 5 t d X dS )z Calls callback and catches all exceptions.
    When something bad happens prints a long error message
    with bug report information and exits the program   zBSorry, command-not-found has crashed! Please file a bug report at:)filez9Please include the following information with the report:zcommand-not-found version: %szPython version: %d.%d.%d %s %dr   NZlsb_releasez-iz-dz-rz-c)stdoutzException information:)sysexit	Exceptionprint_stderrversion_info
subprocesscallImportErrorOSError	traceback	print_exc)callbackZbug_report_urlversionexr   r    r   6/usr/lib/python3/dist-packages/CommandNotFound/util.pycrash_guard   s0    r   )Z
__future__r   r   r   r   Z_gettext_methodgetattrZtranslationr   r   __all__r   r   r   r   <module>   s   
