
9¯T˜  ã               @   s˜   d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z e j d k rX d Z n d Z e e j d d d ƒe ƒ Z	 d	 d
 „  Z
 d d
 g Z d S)é    )Úprint_functionNÚ3ÚgettextZugettextzcommand-not-foundZfallbackTc          %   C   s™  z„y |  ƒ  Wnrt  k
 r‚} zRt t d ƒ d t j ƒt | d t j ƒt t d ƒ d t j ƒt d t j ƒ t t d ƒ | d t j ƒt t d ƒ t j d t j ƒy5 d d l } | j d d	 d
 d d g d t j ƒWn t t	 f k
 rYn Xt t d ƒ d t j ƒt d t j ƒ t | d t j ƒy d d l
 } | j ƒ  Wn t k
 roYn XWYd d } ~ Xn XWd t j d ƒ Xd S)zœ Calls callback and catches all exceptions.
    When something bad happens prints a long error message
    with bug report information and exits the programzBSorry, 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:é   )Ú	ExceptionÚprintÚ_ÚsysÚstderrÚversion_infoÚ
subprocessÚcallÚImportErrorÚOSErrorÚ	tracebackÚ	print_excÚexit)ÚcallbackZbug_report_urlÚversionÚexr   r   © r   ú6/usr/lib/python3/dist-packages/CommandNotFound/util.pyÚcrash_guard   s0     )r   Zgettext_wrapper)Z
__future__r   r   Zlocaler   r   Z_gettext_methodÚgetattrZtranslationr
   r   Ú__all__r   r   r   r   Ú<module>   s   	