%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/hplip/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/hplip/__pycache__/doctor.cpython-312.pyc

�

=	f�2���dZdZdZdZddlZddlZddlZddlZddl�ddl	�	ddl
mZmZm
Z
mZmZmZmZddl�ddlmZed	dd
fdezd	dd
fej8ej:dej8ej<ej>ej@ejBejDgZ#e$Z%dZ&dZ'dZ(da)dZ*dZ+dZ,dAd�Z-d�Z.d�Z/d�Z0d�Z1gggfd�Z2dBd�Z3ejie�	e
jjeeeee#e$e6fe7e8e9fd
�Z:e:jwdgd�d��\Z<Z=Z>Z?Z@ZAej�d�rej�d�dZ(e<D]�\ZGZHeGdk(reIZ%d
Z'ej�d�e-��(eGd k(reHZ&�0eGd!vrej�d"�e-��MeGd#k(rej�d$�e-��keGd%vr8eHj��j��Z(ej�e(�r��e-���eGd&k(rd
Z+��eGd'k(s��d
Z,��	ej��dk(r.ej�e�d(eNeO����ej0d
�e:j�d	�de:_Qe:j��ej�j�d)eUj�z�ZWej�j�eW�r	ej�eW�ej�eW�ej�ej��ej�d*ej�eW�z�ej�d	�e'r-ej��dk7rej�d+�e3d
�e`j�d,d-�Z@eebe$e@�Zcecj�j��ej�ej�d.��e1ecj��ej�ej�d/��ej�d0d
�Zhehr1e.eh�Zhej�eh�Zjejdk7r#ej�d1�nej�d2�ej�ej�d3��e,recj�eld
�\ZmZnnecj�eld�\ZmZnemsenr�ecj��s ecj��secj��r�e2ecj��ecj��ecj���e/ecj��ecj�j�e$ecj��ecj��ecj���ej�ej�d4��ej�ej�d5��ej�ecj�j�e%e@de&�ej�ej�d6��e0ec�ej��Zvevrrej�ej�d7��ej��\ZxZyevD]Zzej�d8ezz��ej�ej�d9exz��ecj��Z|e|r^ej�ej�d:��e|D]9Zzej�d;ezz�ej�ej�d<ez���;e*r ej�ej�d=��ej�ej�d>��ej�d	�ej�d	�ej�d?�e3d�y#e$rHZdej(dvr	ed�n#ej/d	�ej0d
�YdZ[��VdZ[wwxYw#ej�$r-Zej�ej��e-�YdZ[���dZ[wwxYw#eZ$rY��wxYw#e}$rej�d@�e3d
�YywxYw)Cz1.0z(Self Diagnse Utility and Healing Utilityz	hp-doctorzqTool checks for the deprecated, plug-in, dependencies, queues, permission issues and provides self diagnose steps�N)�*)�utils�tui�module�queues�os_utils�services�
smart_install�cupsext��)�DependenciesCheck�nameTzUsage: %s [OPTIONS]�summary)zRun in interactive mode:z-i or --interactive (Default)�optionFFc��|dk(rtjtt�tjt
|ttt�td�y)N�text�)r�	log_title�	__title__�__version__�format_text�USAGE�__mod__�
clean_exit)�typs �/usr/share/hplip/doctor.py�usagerMs4��
�f�}�
���	�;�/�	���e�S�)�W�k�B��q�M�c��ttk(r|dz
}nttk(r|dz
}tr|dz
}tr|dtzz
}|dz
}|S)Nz -i z -u z -n z -l%sz -s )�MODE�INTERACTIVE_MODE�GUI_MODE�PERFORM_IN_NON_INTERACTIVE_MODE�	LOG_LEVEL)�cmds r�append_optionsr'UsS������v�
��	
��	��v�
��&��v�
����w�y� � ���6�M�C��Jrc�J�tj�sbtdk(rY|jj	�dk(rtjd�ntjd�|j�andats tjd�td�tS)NF�sudozENTER SUDO PASSWORDzENTER ROOT/SUPERUSER PASSWORDTzV3 incorrect attempts. (or) Insufficient permissions(i.e. try with sudo user).
Exiting.�)r	�running_as_root�VALID_AUTHENTICATION�passwordObj�getAuthTyper�title�check_password�log�errorr)�cores r�authenticater4fs{���#�#�%�*>�%�*G�
���'�'�)�V�3��I�I�+�,��I�I�5�6�#�2�2�4��#����	�	�k�l��1�
��rc� �|j�}|tk(rtjdddgd�\}}n�|tk(rtjdddgd�\}}n[|t
k(rtjdddgd�\}}n5|tk(rtjd�ytjd�y|rU|dk(rPd	}t|�}tj|�}|d
k(rytjtjd��y)
NzPFound Plugin version mismatch. Press 'y' to re-install the plugin(y=yes*, n=no):�y�nzDPlugins corrupted. Press 'y' to re-install the plugin(y=yes*, n=no):zDPlugin's are missing. Press 'y' to install the plugin(y=yes*, n=no):zPlugin's already installedTz#No plug-in printers are configured.z	hp-pluginrzSFailed to install Plugin. Please run 'hp-plugin' command to install plugin manuallyF)
�get_plugin_status�PLUGIN_VERSION_MISMATCHr�enter_choice�PLUGIN_FILES_CORRUPTED�PLUGIN_NOT_INSTALLED�PLUGIN_INSTALLEDr1�infor'r�execute�bold)r3�
plugin_sts�ok�
user_inputr&�stss      r�install_pluginrE}s���'�'�)�J��,�,��'�'�(z�|�BE�|F�HK�L�
��:�	�-�	-��'�'�(n�ps�ux�oy�{~��
��:�	�+�	+��'�'�(n�ps�ux�oy�{~��
��:�	�'�	'����-�.�����6�7��	�j�C�����S�!�����s�#���!�8���H�H�S�X�X�s�t�u�rc�^�|j�r+tjd�tjd�ytj	d|j
�d|j�d��tjtjd�ddgd�\}}|r|dk7rtd	�yy)
NzThis distro is supported.zNo Deprecated items are foundzThis distro (i.e z  z,) is either deprecated or not yet supported.zZThe diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):r6r7r)�validate_distro_versionr1�debugr>r2�distro_name�distro_versionrr:�redr)r3rBrCs   r�deprecated_checkrL�s����#�#�%��	�	�-�.����0�1��	�	�Y]�Yi�Yi�ko�k~�k~��	A��'�'����1M�)N�PS�UX�OY�[^�_�
��:��Z�#�%��q�M�&rc�l�t|�r�tjtjd��tjtjdtd�z��|D];}d|vrtj	d|�dd�d���$tj	d|z��=t|�r{tjtjd��tjtjdtd�z��|D]}tj	d|z��t|�r|tjtjd	��tjtjdtd	�z��|D]}tj	d
|z��yy)NzMissing Required Dependencies�-�cups�'z' package is missing or 'z' service is not running.z%'%s' package is missing/incompatible zMissing Optional DependencieszMissing Commandsz'%s' is missing)�lenr1r>r@r2)�required_dependencies�optional_dependencies�missing_cmd�packages_to_installr&s     r�display_missing_dependenciesrV�sN��
� �!�������9�:�;�������#�c�"A�B�B�C�D�#8�	V���+�+��y�y�Tg�hn�o�p��y�y�@�AT�T�U�		V�� �!�������9�:�;�������#�c�"A�B�B�C�D�#8�	S���I�I�=�>Q�Q�R�	S��;��������,�-�.�������#�c�"4�5�5�6�7��	-�C��I�I�'��+�,�	-�rc��tj�trtj	d�			�t
j|�y#t
$rY�!wxYw)Nz'

Please close this terminal manually. )�mod�unlockInstance�DONOT_CLOSE_TERMINALr1r>�KeyboardInterrupt�sys�exit)�	exit_codes rrr�sP����������<�=�	����
�H�H�Y���!�	��	�s�A
�
	A�Azhl:gnid:f:w)
zsummary-only�helpz	help-restzhelp-manz	help-desc�interactive�guizlang=zlogging=rH)�handle_device_printer�HPLIP_DEBUGrHz-nz*NON_INTERACTIVE mode is not yet supported.z-d)z-uz--guizGUI is not yet supported.z-fz%Option from file is not yet supported)z-lz	--loggingz-wz--summary-only� z%s/hp-doctor.logzUpgrade log saved in: %sz0Non Interactive mode should be run in root mode.�	configurez
ui-toolkitz#

Checking for Deprecated items....z 

Checking for HPLIP updates....z
hp-upgradez^Failed to upgrade latest HPLIP. Is hp-upgrade already running (i.e. foreground or background)?z#Failed to locate hp-upgrade utilityz

Checking for Dependencies....z

Checking Permissions....z$

Checking for Configured Queues....z*

Checking for HP Properitery Plugin's....z<

Checking for 'CD-ROM'/'Smart Install' Detected Devices....zDSmart Install is Enabled in '%s' Printer. This needs to be disabled.z4
Refer link '%s' to disable Smart Install manually.
z!

Checking for Printer Status....z<'%s' Printer is either Powered-OFF or Failed to communicate.zTurn On Printer and re-run %sz9
Please reboot the system before performing any function.z
Diagnose completed...
zxMore information on Troubleshooting,How-To's and Support is available on http://hplipopensource.com/hplip-web/index.htmlz	User exit)r)r)~rrr�__doc__�getopt�osr\�getpass�base.g�base.strings�baserrrrrr	r
�ImportError�e�args�check_extension_module_envr1�	exceptionr]�installer.core_install�checkr�USAGE_SPACE�
USAGE_MODE�
USAGE_OPTIONS�
USAGE_HELP�USAGE_LOGGING1�USAGE_LOGGING2�USAGE_LOGGING3rr"r!�
DEVICE_URIr$r%r,�IS_RESTART_REQrZ�SUMMARY_ONLYrr'r4rErLrVr�
set_module�Moduler#�UI_TOOLKIT_QT3�UI_TOOLKIT_QT4�UI_TOOLKIT_QT5rX�parseStdOpts�opts�
device_uri�printer_name�mode�
ui_toolkit�loc�GetoptErrorr2�msg�getenv�	set_level�o�a�NON_INTERACTIVE_MODE�warn�lower�strip�geteuid�queryString�ERROR_RUNNING_AS_ROOT�lockInstance�quiet�	showTitle�path�normpath�prop�user_dir�log_file�exists�remove�OSError�set_logfile�	set_where�LOG_TO_CONSOLE_AND_FILErHr@�sys_conf�get�
MODE_CHECK�depr3�initr>�which�upgrade_cmdr?rD�validate�DEPENDENCY_RUN_AND_COMPILE_TIME�
num_errors�	num_warns�get_required_deps�get_optional_deps�get_cmd_to_run�install_missing_dependencies�
main_functionr-� get_smartinstall_enabled_devices�smart_ins_dev_list�get_SmartInstall_tool_info�url�	tool_name�printer�get_communication_error_devs�comm_err_devr[�rr�<module>r�sd��.��6�	�
��B���	�
�����Q�Q�Q�%�#�
�2�v�t�	$�
�'�
)�2�y�$�	?�	�	�	�	�	�	�	W�	�	�	�	�	�	�	�	�	�	�	�	�u�3�3�U�5I�5I�	
��"��
�
� %��
�	�����������" �.�6�8:�PR�`b�-�.����w���
�&�-�-���K��%�%�x�0�#�^�^�D�d�L�C�
���
�0`�+0� �2�:�D�*�l�D�*�c�
�2�9�9�]���M�M�'���I���D�A�q��D�y�#��*.�'����=�>�
��	
�d���
�	
�o�	����,�-�
��	
�d�����8�9�
��	
�!�	!��G�G�I�O�O�%�	��}�}�Y�'��G�	
�d��#��	
��	���3�8s��r�z�z�|�q���	�	�W�k�2G�&H�I�J����������R���C�I��M�M�O��w�w��� 2�4�=�=� @�A�H�	�w�w�~�~�h��	��B�I�I�h���O�O�H���M�M�#�-�-�.��I�I�(�3�8�8�H�+=�=�>��I�I�b�M�&�:�2�:�:�<�1�+<��	�	�D�E��1�
����k�,�7�J��Z�(8��D�C��H�H�M�M�O��H�H�S�X�X�=�
>�?��S�X�X���H�H�S�X�X�:�
;�<��%�+�+�l�4�0�K��$�[�1���h���{�+���!�8��I�I�v�w��	�	�7�8��H�H�S�X�X�9�
:�;�� #���-L�d� S��
�I� #���-L�e� T��
�I��Y�� � �"�c�&;�&;�&=��AS�AS�AU�(��)>�)>�)@��AV�AV�AX�Z]�Zl�Zl�Zn�o�����"��H�H�1�1�2B�3�CX�CX�CZ�[^�[p�[p�[r�tw�uG�uG�uI�
J�������8�9�:�*�H�H�S�X�X�>�
?�@��F������-�-�t�J��z�R��H�H�S�X�X�D�
E�F��3��G��G�G�I���������Z�[�\�A��A�A�C���Y�)�	f�G��I�I�\�]d�d�e�	f�������R�TW�X�Y�Z��3�3�5�L��������?�@�A�#�	H�G��I�I�T�U\�\�]��H�H�S�X�X�=�g�E�F�G�	H��������V�W�X��H�H�S�X�X�1�
2�3��H�H�R�L��H�H�R�L��H�H�H�I��q�M��{	���A�F�F�1�I��"�9�-��
�
�b������������V�����I�I�a�e�e��	�G�G����b�	��	��H���I�I�k���q�M��sg�]�&;^�B-_�0_�R_�^�	=^�^�_�#"_�_�_�_�_�_�`�?`

Zerion Mini Shell 1.0