%PDF- %PDF-
Direktori : /usr/share/hplip/__pycache__/ |
Current File : //usr/share/hplip/__pycache__/firmware.cpython-312.pyc |
� = f� � �x � d Z dZdZdZddlZddlZddlZddlZddlZddl Z ddl � ddlmZm Z mZmZmZ ddlmZ dd lmZ ej6 eee edeeefee e!fdd� Z"e"jG ejH dd gddg�� dZ%dZ&dZ'dZ(dZ)dZ*dZ+e"jY ddg� \ Z-Z%Z&Z.Z/Z0e-D ]� \ Z1Z2e1dk( r�dZ* e2jg dd� \ Z(Z)ej1 de(z � ej1 de)z � e7e(� dk7 s e7e)� dk7 r&ejk de2z � ejl d� e2Z'eZ.��e1dv s�� e8e2� Z+eZ.�� e.ek( r2e/dk( se/d k( r( ejr � sHejk d!ez � eZ.n1e.ek( r,e/d"k( r' ejt � sejk d#ez � eZ.e.eefv rde"_; e.ek( r�e/dk( se/d k( r ejx e/� \ Z=Z> ee>d$z � Z?e/d"k( r ddl@� dd%lAmBZB e"j� � e"j� e%e&d'ej� dfi�(� Z%e%rv e=ej� � ZGe?j� de%� ZHeHj� � ej1 d)� e/dk( se/d k( reGj� � ne/d"k( reHj� � ejl d� e"j� � e'�Qej1 d*e'z � ej� e'd� \ Z%ZNZOe%sZejk d+� ejl d� n6e"j� e%e&d'ej� dfi�(� Z%e%s ejl d� ej� e%e&� ZQ e+r ej� e+� eQj� � eQj� � eQj� j� d'd� ZYeYr\eQj� e(e)� r&e*sej� d.� ejl d� nJejk d/� ejl d� n&ejk d0e%z � ejl d� eQj� � y# e$ r"Zej1 e� dd lmZ Y dZ[��2dZ[ww xY w# e4$ r* ejk de2z � ejl d� Y ���w xY w# e4$ r ejk d� dZ+Y ���w xY w# e$ r' ejk d&� ejl d� Y ���w xY w# eL$ r ejl d� Y ��jw xY w# eR$ r' ejk d,� ejl d� Y ���w xY w# eR$ r;Zejk d-ej� z � ejl d� Y dZ[���dZ[ww xY w# eQj� � w xY w# eL$ r ejk d1� Y yw xY w)2z2.4zFirmware Download Utilityzhp-firmwarez�Download firmware to a device that requires downloaded firmware to function. (Note: Most printers do not require the use of this utility).� N)�*)�device�status�utils�tui�module)�cups)� import_module)�dyn_import_modT)zUse USB IDs to specify printer:zu-s bbb:ddd, where bbb is the USB bus ID and ddd is the USB device ID. The ':' and all leading zeroes must be present.�optionF)z!Seconds to delay before download:z2-y<secs> or --delay=<secs> (float value, e.g. 0.5)r Fz hp-pluginz hp-toolbox)� extra_options� see_also_listFg zy:s:zdelay=z-s�:� zUSB bus ID: %szUSB device ID: %szInvalid USB IDs: %s� z1Invalid USB IDs '%s'. Must be the format: bbb.ddd)z-yz--delayzHInvalid delay value. Must be numeric (float) value. Setting delay to 0.0�qt4�qt5zD%s -u/--gui requires Qt4/Qt5 GUI support. Entering interactive mode.�qt3z@%s -u/--gui requires Qt3 GUI support. Entering interactive mode.z.firmwaredialog)�FirmwareDialogz,Unable to load Qt3 support. Is it installed?zfw-download)�filterzStarting GUI loop...zUSB bus node: %sz5Invalid USB Device ID or USB bus ID. No device found.zError opening device. Exiting.z#Error opening device (%s). Exiting.zDone.zFirmware download failed.z8Device %s does not support or require firmware download.z User exit)]�__version__� __title__�__mod__�__doc__�sys�getopt�gzip�operator�time�os�base.g�baser r r r r �prntr � importlibr �ImportError�e�log�debug� base.utilsr �Module�INTERACTIVE_MODE�GUI_MODE�NON_INTERACTIVE_MODE�UI_TOOLKIT_QT5�UI_TOOLKIT_QT4�UI_TOOLKIT_QT3�mod�setUsage�USAGE_FLAG_DEVICE_ARGS� device_uri�printer_name�usb_bus_node� usb_bus_id� usb_device_id�silent�delay�parseStdOpts�opts�mode� ui_toolkit�lang�o�a�split� ValueError�error�exit�len�float�canEnterGUIMode4�canEnterGUIMode�quiet� import_dialog�QApplication� ui_package�ui�qt�ui.firmwaredialogr � showTitle�getDeviceUri�gt�argv�app�dialog�show�exec_� exec_loop�KeyboardInterrupt�makeURI�sane_uri�fax_uri�Device�d�Error�sleep�open� queryModel�msg�mq�get�fw_download�downloadFirmware�info�close� � �/usr/share/hplip/firmware.py�<module>rn s� ��. ��'� � �� W�� � � � � � � � 3� 3� �;�'�]� �&�-�-���K��$�)�8�5I�J�'���H�$�PT�V�C� �L�L��.�.� v�t�v� $�\�2� � 4� �J��L��L��J��M� �F��E� ����(��,� ;�D�*�l�D�*�d� � (���1���9��F� �,-�G�G�C��O�)� �M�� � �*�Z�7�8�� � �-� �=�>� �:��!�#�s�=�'9�Q�'>�� � �M�PQ�Q�R��������L�'�D� �#� #� ��a��� (�D�3(�8 �x��Z�5�0�J�%�4G�%�u�%�%�'��I�I�\�_f�f�g�#�D� �� �j�E�1�#�e�#�#�%��I�I�X�[b�b�c�#�D���*�+�+��� ��x������u�!4� (;�u�':�':�:�'F�$�L�*��z�,=�=�>�B������8� � � ���%�%�j�,�!�H�K�K��#3�4� &� 6� � ��s�x�x�(�C��&�&�t�Z�8�F��K�K�M� �� � �0�1���&�*��*=��9�9�;��5�(��#�#�%� �������M�M�O���� � �$�|�3�4�(6����|�Q�(G�%� �H�g���I�I�M�N��C�H�H�Q�K� �%�%�j�,�!�H�K�K��#3�4� &� 6� � ��C�H�H�Q�K���F�M�M�*�l�3�� �� �T�Z�Z�� � � �F�F�H� �L�L�N� �d�d�h�h�}�a�0����!�!�*�m�<���H�H�W�%������� � � �5�6������� �I�I�P�S]�]�^��C�H�H�Q�K� ��� �� � ;��I�I�a�L�:�:��;��D � �� � �/�!�3�4������� �� � �� � �d�e��� ��F � ��I�I�D�E��C�H�H�Q�K���( %� ������� ��0 � �� � �2�3��������� � ��I�I�;�a�e�e�C�D��C�H�H�Q�K�K�� ��* ��� ��� ��I�I�k���s �Q �A9V �<=Q;�9AV � R-�B-V �6S �A(V �*AS; �+B+V �T �+V � U � B V � V �Q8�Q3�3Q8�;+R*�&V �)R*�*V �-S �V �S � V �(S8�4V �7S8�8V �;T�V �T�V �(U�V �U�V �V� 0V�=V �V�V �V�V � V9�8V9