ó J¡Vc @sødZdZdZdZddlZddlZddlZddlZddlTddl Ty8ddl m Z m Z m Z mZmZmZmZWnMek rãZdejd krÆedƒqäejd ƒejd ƒnXddlTdd lmZed d efded defe je jdddefe je j e j!e j"e j#e j$g Z%e&Z'dZ)eZ*dZ+ea,eZ-eZ.eZ/dd„Z0d„Z1d„Z2d„Z3d„Z4gggd„Z5d d„Z6ej7eƒy|e j8eeeee%e&e9fe:e;feƒZ<e<j=dddddd d!d"d#d$d%g d&eƒ\Z>Z?Z@ZAZBZCWn-ejDk r›ZejEejFƒe0ƒnXejGd'ƒrÁejHd%ƒd%Z+nxe>D]ú\ZIZJeId(kreKZ'eZ*ejLd)ƒe0ƒqÈeId*kreJZ)qÈeIdQkr;ejLd-ƒe0ƒqÈeId.kr^ejLd/ƒe0ƒqÈeIdRkr˜eJjMƒjNƒZ+ejHe+ƒsÂe0ƒqÂqÈeId2kr­eZ.qÈeId3krÈeZ/qÈqÈWyejOƒd krejEd4eePeQƒfƒejd ƒne<jRd ƒee<_Se<jTƒejUjVd5eWjXƒZYejUjZeYƒr{yej[eYƒWq{e\k rwq{Xnej]eYƒej^ej_ƒej`d6ejaeYƒƒej`d ƒe*rñejOƒd krñejEd7ƒe6d ƒnebjcd8d9ƒZBeede&eBƒZeeejfƒejgejad:ƒƒe4eeƒejgejad;ƒƒe jhd<eƒZieir§e1eiƒZiejjeiƒZkekd kr´ejEd=ƒq´n ejEd>ƒejgejad?ƒƒe/rëeejlemeƒ\ZnZoneejlemeƒ\ZnZoenseor0eejpƒs3eejqƒs3eejrƒrŠe5eejpƒeejqƒeejrƒƒe2eeƒeejse&eejpƒeejqƒeejrƒƒnejgejad@ƒƒeejtƒs¼ejgdAƒneejtƒr0ejgejadBƒƒejgejadCeudBƒƒƒejgdDƒe2eeƒeejvƒr-eZ-q-q0nejgejadEƒƒejweejxe'eBee)ƒejgejadFƒƒe3eeƒejyƒZzezrûejgejadGƒƒej{ƒ\Z|Z}xezD]Z~ejEdHe~ƒqÃWejgejadIe|ƒƒneejƒZ€e€rbejgejadJƒƒx<e€D]1Z~ejEdKe~ƒejgejadLeƒƒq*Wne-rejgejadMƒƒnejgejadNƒƒejgd ƒejgd ƒejgdOƒe6d ƒWn(ek róejEdPƒe6d ƒnXdS(Ss1.0s(Self Diagnse Utility and Healing Utilitys hp-doctorsqTool checks for the deprecated, plug-in, dependencies, queues, permission issues and provides self diagnose stepsiÿÿÿÿN(t*(tutilsttuitmoduletqueuestos_utilstservicest smart_installtcupsextiti(tDependenciesChecktnamesUsage: %s [OPTIONS]tsummarysRun in interactive mode:s-i or --interactive (Default)toptionttextcCsF|dkrtjttƒntjt|tttƒtdƒdS(NRi(Rt log_titlet __title__t __version__t format_texttUSAGEt__mod__t clean_exit(ttyp((sV/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/doctor.pytusageMs cCsjttkr|d7}nttkr2|d7}ntrE|d7}ntr\|dt7}n|d7}|S(Ns -i s -u s -n s -l%ss -s (tMODEtINTERACTIVE_MODEtGUI_MODEtPERFORM_IN_NON_INTERACTIVE_MODEt LOG_LEVEL(tcmd((sV/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/doctor.pytappend_optionsUs      cCs„tjƒ rZttkrZ|jjƒdkr>tjdƒn tjdƒ|jƒant ats€t j dƒt dƒntS(NtsudosENTER SUDO PASSWORDsENTER ROOT/SUPERUSER PASSWORDsV3 incorrect attempts. (or) Insufficient permissions(i.e. try with sudo user). Exiting.i( Rtrunning_as_roottVALID_AUTHENTICATIONtFalset passwordObjt getAuthTypeRttitletcheck_passwordtTruetlogterrorR(tcore((sV/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/doctor.pyt authenticatefs   cCs*|jƒ}|tkr<tjdddgdƒ\}}nŽ|tkrltjdddgdƒ\}}n^|tkrœtjdddgdƒ\}}n.|tkr¹tjdƒt Stjdƒt S|r&|dkr&d}t |ƒ}t j |ƒ}|d kr t Stjtj d ƒƒntS( NsPFound Plugin version mismatch. Press 'y' to re-install the plugin(y=yes*, n=no):tytnsDPlugins corrupted. Press 'y' to re-install the plugin(y=yes*, n=no):sDPlugin's are missing. Press 'y' to install the plugin(y=yes*, n=no):sPlugin's already installeds#No plug-in printers are configured.s hp-pluginisSFailed to install Plugin. Please run 'hp-plugin' command to install plugin manually(tget_plugin_statustPLUGIN_VERSION_MISMATCHRt enter_choicetPLUGIN_FILES_CORRUPTEDtPLUGIN_NOT_INSTALLEDtPLUGIN_INSTALLEDR(tinfoR'RRtexecutetboldR"(R*t plugin_ststokt user_inputRtsts((sV/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/doctor.pytinstall_plugin}s(  $ $ $     cCs”|jƒr)tjdƒtjdƒngtjd|j|jfƒtjtj dƒddgdƒ\}}| sƒ|dkrt dƒndS(NsThis distro is supported.sNo Deprecated items are foundsCThis distro (i.e %s %s) is either deprecated or not yet supported.sZThe diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):R,R-i( tvalidate_distro_versionR(tdebugR4R)t distro_nametdistro_versionRR0tredR(R*R8R9((sV/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/doctor.pytdeprecated_check˜s  *cCs_t|ƒrtjtjdƒƒtjtjdtdƒƒƒxH|D]=}d|krutjd|dfƒqItjd|ƒqIWnt|ƒrôtjtjdƒƒtjtjdtdƒƒƒx"|D]}tjd|ƒqÖWnt|ƒr[tjtjdƒƒtjtjdtdƒƒƒx"|D]}tjd|ƒq=WndS( NsMissing Required Dependenciest-tcupss7'%s' package is missing or '%s' service is not running.s%'%s' package is missing/incompatible sMissing Optional DependenciessMissing Commandss'%s' is missing(tlenR(R4R6R)(trequired_dependenciestoptional_dependenciest missing_cmdtpackages_to_installR((sV/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/doctor.pytdisplay_missing_dependencies£s"          cCsOtjƒtr>tjdƒy xq#Wq>tk r:q>Xntj|ƒdS(Ns' Please close this terminal manually. (tmodtunlockInstancetDONOT_CLOSE_TERMINALR(R4tKeyboardInterrupttsystexit(t exit_code((sV/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/doctor.pyRºs   s hl:gnid:f:ws summary-onlythelps help-restshelp-mans help-desct interactivetguislang=slogging=R=thandle_device_printert HPLIP_DEBUGs-ns*NON_INTERACTIVE mode is not yet supported.s-ds-us--guisGUI is not yet supported.s-fs%Option from file is not yet supporteds-ls --loggings-ws--summary-onlys%s %ss%s/hp-doctor.logsUpgrade log saved in: %ss0Non Interactive mode should be run in root mode.t configures ui-toolkits# Checking for Deprecated items....s Checking for HPLIP updates....s hp-upgrades^Failed to upgrade latest HPLIP. Is hp-upgrade already running (i.e. foreground or background)?s#Failed to locate hp-upgrade utilitys Checking for Dependencies....s Checking Permissions....sPermissions are correct.sSELinux StatusRBs(SELinux is enabled. Needs to be disableds$ Checking for Configured Queues....s* Checking for HP Properitery Plugin's....s< Checking for 'CD-ROM'/'Smart Install' Detected Devices....sDSmart Install is Enabled in '%s' Printer. This needs to be disabled.s4 Refer link '%s' to disable Smart Install manually. s! Checking for Printer Status....s<'%s' Printer is either Powered-OFF or Failed to communicate.sTurn On Printer and re-run %ss9 Please reboot the system before performing any function.s Diagnose completed... sxMore information on Troubleshooting,How-To's and Support is available on http://hplipopensource.com/hplip-web/index.htmls User exit(s-us--gui(s-ls --logging(‚RRRt__doc__tgetopttosRNtgetpasstbase.gt base.stringstbaseRRRRRRRt ImportErrortetargstcheck_extension_module_envR(t exceptionROtinstaller.core_installtcheckR R't USAGE_SPACEt USAGE_MODER"t USAGE_OPTIONSt USAGE_HELPtUSAGE_LOGGING1tUSAGE_LOGGING2tUSAGE_LOGGING3RRRtNonet DEVICE_URIRRR!tIS_RESTART_REQRLt SUMMARY_ONLYRRR+R;RARIRt set_moduletModuleRtUI_TOOLKIT_QT3tUI_TOOLKIT_QT4RJt parseStdOptstoptst device_urit printer_nametmodet ui_toolkittloct GetoptErrorR)tmsgtgetenvt set_leveltotatNON_INTERACTIVE_MODEtwarntlowertstriptgeteuidt queryStringtERROR_RUNNING_AS_ROOTt lockInstancetquiett showTitletpathtnormpathtproptuser_dirtlog_filetexiststremovetOSErrort set_logfilet set_wheretLOG_TO_CONSOLE_AND_FILER=R6tsys_conftgett MODE_CHECKR*tinitR4twhicht upgrade_cmdR5R:tvalidatetDEPENDENCY_RUN_AND_COMPILE_TIMEt num_errorst num_warnstget_required_depstget_optional_depstget_cmd_to_runtinstall_missing_dependenciestget_disable_selinux_statusRDtdisable_SELinuxt main_functionR#t get_smartinstall_enabled_devicestsmart_ins_dev_listtget_SmartInstall_tool_infoturlt tool_nametprintertget_communication_error_devst comm_err_devRM(((sV/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/doctor.pyts8      8           -                                  $" +           !