~ubuntu-branches/ubuntu/vivid/hplip/vivid-security

« back to all changes in this revision

Viewing changes to check-plugin.py

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2015-02-04 21:18:00 UTC
  • mfrom: (1.8.2)
  • Revision ID: package-import@ubuntu.com-20150204211800-3ahjuezv75ah97zz
Tags: 3.15.2-0ubuntu1
* New upstream release
  - Python3 support for HPLIP
  - Doesn't build against libjpeg-turbo 1.3.90 (LP: #1388126)
  - hpcups crashes if DEVICE_URI not set in environment (LP: #1395676)
  - Incorrect call to hpmudext.device_open (LP: #1388007)
  - plugin download fails if python links to python3 (LP: #1187055)
  - Incorrect IEEE 1284 Device IDs for many models (LP: #802999)
* debian/patches/85_rebuild_python_ui.dpatch: Manually updated to apply to new
  upstream source code.
* debian/patches/hp_photosmart_pro_b9100_support.dpatch,
  debian/patches/simple-scan-as-default.dpatch,
  debian/patches/hpfax-bug-function-used-before-importing-log.dpatch,
  debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.dpatch,
  debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.dpatch,
  debian/patches/hpaio-option-duplex.diff,
  debian/patches/musb-c-do-not-crash-on-usb-failure.patch,
  debian/patches/process-events-for-systray.patch: Refreshed with quilt.
* debian/rules: Force Python3 build using PYTHON=python3 ./configure option
* debian/rules: Use py3versions to get system's Python3 interpreter version
* debian/rules: Use relative symlink for /usr/sbin/hpssd, so that shebang
  correction works.
* debian/rules: Make sure that the Python interpreter paths in all executables
  use python3.
* debian/rules: Use dh_python3 instead of dh_python2.
* debian/control: Replaced all Python-related dependencies by their
  Python3 equivalent.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# Author: Suma Byrappa, Amarnath Chitumalla
21
21
#
22
22
#
23
 
 
 
23
from __future__ import print_function
24
24
__version__ = '1.1'
25
25
__title__ = 'AutoConfig Utility for Plug-in Installation'
26
26
__mod__ = 'hp-check-plugin'
27
27
__doc__ = "Auto config utility for HPLIP supported multifunction Devices for installing proprietary plug-ins."
28
28
 
 
29
 
29
30
# Std Lib
30
31
import sys
31
32
import os
92
93
#Installs/Uploads the firmware to device once plugin installation is completed.
93
94
def install_firmware(pluginObj,Plugin_Installation_Completed, USB_param):
94
95
    #timeout check for plugin installation
95
 
    sleep_timeout = 6000        # 10 mins time out
 
96
    sleep_timeout = 6000    # 10 mins time out
96
97
    while Plugin_Installation_Completed is False and sleep_timeout != 0:
97
 
        time.sleep(0.3) #0.3 sec delay
98
 
        sleep_timeout = sleep_timeout -3
 
98
        time.sleep(0.3) #0.3 sec delay
 
99
        sleep_timeout = sleep_timeout -3
99
100
 
100
 
        ps_plugin,output = utils.Is_Process_Running('hp-plugin')
101
 
        ps_diagnose_plugin,output = utils.Is_Process_Running('hp-diagnose_plugin')
 
101
        ps_plugin,output = utils.Is_Process_Running('hp-plugin')
 
102
        ps_diagnose_plugin,output = utils.Is_Process_Running('hp-diagnose_plugin')
102
103
 
103
104
        if ps_plugin is False and ps_diagnose_plugin is False:
104
105
            Plugin_Installation_Completed = True
164
165
    opts, device_uri, printer_name, mode, ui_toolkit, loc = \
165
166
         mod.parseStdOpts('l:hHuUmMfFpPgG',['gui','help', 'help-rest', 'help-man', 'help-desc','logging='],handle_device_printer=False)
166
167
 
167
 
except getopt.GetoptError, e:
 
168
except getopt.GetoptError as e:
168
169
        log.error(e.msg)
169
170
        usage()
170
171
        sys.exit(1)
198
199
#        GUI_Mode = False
199
200
 
200
201
    elif o == '--help-desc':
201
 
        print __doc__,
 
202
        print(__doc__, end=' ')
202
203
        sys.exit(0)
203
204
 
204
205
    elif o in ('-l', '--logging'):
300
301
 
301
302
elif Plugin_option_Enabled:
302
303
    if not Is_Plugin_Already_Installed:
303
 
        install_Plugin (Systray_Is_Running, True)               # needs to run hp-plugin without usig systray
 
304
        install_Plugin (Systray_Is_Running, True)        # needs to run hp-plugin without usig systray
304
305
 
305
306
if Firmware_Option_Enabled:
306
307
    if Is_Plugin_Already_Installed is False: