JVc@snddlZddlZddlZddlZddlZddlmZmZm Z ddl Z ddl m Z ddlm Z ddl Z ddlZddlZddlTddlTddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZmZmZdd lmZmZmZmZddlTddl m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&ej'dej(Z)dZ*dZ+yddl,Z,Wn>e-k rej.d re/j0de1j2dnn(Xy e,j3Z4Wne5k r*dZ4nXe6a7e6a8y,ddl9Z9ddl9m:Z:m;Z;e<a7Wne-k re/j=dnXddl>Z>e>j?de@dddgZAddddfZBdddfZCeDZEddddd fZFd!fZGej'd"ejHZIej'd#ejHZJej'd$ejHZKej'd%ejHZLejMZNej'd&ejHZOej'd'ejHZPej'd(ejHZQd)eRfd*YZSd+eSfd,YZTd-eSfd.YZUeDd/ZVdd0ZWd1ZXd2ZYeAd3d4eEd5d6d!fd7ZZd!geEd8Z[d!geEd9Z\d!geEd:Z]e6d;Z^d<Z_e<d=Z`d>Zad?Zbd@ZcdAZde<dBZedCZfidDeg6dEeh6dEei6dFej6dGek6dHel6dIem6dJen6dKeo6dLep6dMeq6dNer6dOes6dPet6dQeu6dRev6dSew6dTex6dNey6dUez6dVe{6dWe|6dXe}6dYe~6Zi dDe6dZe6d[e6d\e6d]e6d^e6d_e6d`e6dae6dbe6dce6Zidde6dee6dfe6dge6dhe6die6dje6Zidke6dke6dle6ZiZdmeRfdnYZdoejfdpYZdqejfdrYZdsejfdtYZdS(uiNi(turllib_requestt urllib_parset urllib_error(tBytesIO(t http_client(t*(tutils(tservices(tos_utils(tstatus(tpml(tpcltldltcups(tmodelstmdnstslptavahi(tPY3t to_bytes_utf8t to_unicodetto_string_latintto_string_utf8t xStringIOsHTTP/\d.\d\s(\d+)iit HPLIP_BUILDs>HPMUDEXT could not be loaded. Please check HPLIP installation.i (tlowlevelt SessionBusspython-dbus not installed.tignoretusbtparR tnettprinttscantfaxtpcardtcopythps(.*):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*)|zc=(\S+)|hostname=(\S+))(?:&port=(\d))?s6/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*))&loc=(\S*)s$direct (.*?) "(.*?)" "(.*?)" "(.*?)"s CTR:\d*\s.*;s]\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\bs/dev/.+s (\d+):(\d+)tEventcBseeZejddddZdZdZddZddZd Z d Z d Z RS( itcCst||_t||_t||_t||_t||_t||_|rrt||_ nt j |_ d|_ d|_ dS(Nt80s80sI32sI80sftssisisd( Rt device_urit printer_nametintt event_codetusernametjob_idttitletfloatttimedatettimetpipe_fmttdbus_fmt(tselfR)R*R,R-R.R/R1((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt__init__ks cCstjd|jtjd|jtjd|jtjd|jtjd|jtjd|jtjd|jdS(Ns device_uri=%ss printer_name=%ss event_code=%ds username=%ss job_id=%ds title=%ss timedate=%s( tlogtdebugR)R*R,R-R.R/R1(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR8sc Cs^tj|j|jjd|jjd|j|jjd|j|j jd|j S(Nsutf-8( tstructtpackR3R)tencodeR*R,R-R.R/R1(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt pack_for_pipes**thpssdcCsp|dk rltjd|j||fytj||jtSWqltk rhtjdt SXndS(Ns'Sending event %d to %s (via pipe %d)...sFailed.( tNoneR7R8R,tostwriteR<tTruetOSErrortFalse(R5tfdt recipient((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt send_via_pipes   scom.hplip.StatusServicecCsq|dk rmtrmtjd|j|ftjd|d}|jd|j|j |j |ndS(Ns$Sending event %d to %s (via dbus)...t/R%t signature( R>t dbus_availR7R8R,Rt SignalMessagetappendR4tas_tuplet send_message(R5t session_bust interfacetmsg((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt send_via_dbuss cCst|jS(N(R%RL(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR#scCsd|jS(Ns+(RL(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt__str__scCs.|j|j|j|j|j|j|jfS(N(R)R*R,R-R.R/R1(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRLs( t__name__t __module__tpropR-R6R8R<RFRQR#RRRL(((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR%js      tFaxEventcBs,eZdZdZdZdZRS(cCs5tj||j||_d|_d|_dS(Nt80s80sI32sI80sfstssisisfs(R%R6RLt temp_fileR3R4(R5RYtevent((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR6s  cCs2tjdtj|tjd|jdS(NsFAX:s temp_file=%s(R7R8R%RY(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR8s  cCsd|jS(Ns4(RL(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRRscCs4|j|j|j|j|j|j|j|jfS(N(R)R*R,R-R.R/R1RY(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRLs(RSRTR6R8RRRL(((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRVs   t DeviceIOEventcBs,eZdZdZdZdZRS(cCs5tj||j||_d|_d|_dS(Nt80s80sI32sI80sfItssisisfi(R%R6RLt bytes_writtenR3R4(R5R^RZ((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR6s  cCs2tjdtj|tjd|jdS(NsDEVIO:s bytes_written=%d(R7R8R%R^(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR8s  cCsd|jS(Ns9(RL(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRRscCs4|j|j|j|j|j|j|j|jfS(N(R)R*R,R-R.R/R1R^(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRLs(RSRTR6R8RRRL(((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR[s   cCsd}d}tjs(tatddfStrt rtjdkrgtj dtatddfSy.|dkrt j }nt j |}Wn`t j j k r}tjdkrtjd|ntj d|tatddfSXy)tj d|jdd}taWqt j j k r}ytjdtjWntk rcnXtjd }|rtjj|d }nDtjjtjd }tjj|stjd tddfStj d |tjtj|d d tj dtjdd}xtry'tj d||jdd}Wnct j j k r}tj d|d7}|dkrtjdtddfStjdq"Xtj dtaPq"WqXnt||fS(Nis#Not starting dbus: running as root.s*Unable to connect to dbus session bus. %s s=Unable to connect to dbus session bus (running as root?). %s s1Connecting to com.hplip.StatusService (try #1)...scom.hplip.StatusServices/com/hplip/StatusServiceis hp-systrays systray.pysUnable to start hp-systrays&Running hp-systray: %s --force-startups--force-startups"Waiting for hp-systray to start...iis2Connecting to com.hplip.StatusService (try #%d)...s1Unable to connect to dbus. Is hp-systray running?is Connected.(R>RUt gui_buildRCRIt dbus_disabledR?tgetuidR7R8tdbusRt exceptionst DBusExceptionterrort get_objectRAtwaitpidtWNOHANGRBRtwhichtpathtjointhome_dirtexiststwarntspawnlptP_NOWAITR2tsleep(t dbus_looptserviceRNteRjtt((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt init_dbussp                     c CsDd\}}}t}tj|dk rtjd|tj|\}}|tjkr|rt |}tjd|t }|}qtjdnAt j|dk r`t j|}|j d} |j d} tjd| | ftj | | \}}|tkrP|rPt |}tjd|t }|}qtjdntj|dk rtjd|tj||\}}|tjkr|rt |}tjd|t }|}qtjdntjd |tj||\}}|tjkrY|rYt |}tjd|t }|}ntjd |tj||\}}|tjkr|rt |}|jd d }tjd|t }|}n tjd|sEtjd |tdddg} x4| D])} tj| y+t| \ } }}}}}}}}Wntk riqnX|dkrt| }tj| |jdtj\}}|tjkrtj|\}}t|jdd}tj|qn|j|jkr1tjd| t }| }PqtjdqWn|ryt|}Wn6tk r}tjd|jd\}}}qX|jdt t kr|jddr|jdd}n|jddr |jdd}q qd\}}}n d \}}|r7t!j"dd|n|||fS(!NR&sTrying parallel with %ss Found: %ss Not found.iis Trying USB with bus=%s dev=%s...sTrying IP address %ssTrying ZC hostname %ssADevice not found using mDNS hostname. Trying with DNS hostname %ssip=s hostname=sTrying serial number %stbusRRsio-modetSNs Error: %ss support-types scan-typeishp:shpaio:sfax-typeshpfax:t last_usedR)(R&R&R&(R&R&R&(R&R&R&(R&R&(#RCtdev_pattsearchR>R7R8thpmudextt make_par_urit HPMUD_R_OKRRAtusb_pattgroupt make_usb_urit ERROR_SUCCESStip_patt make_net_urit make_zc_uritreplacet probeDevicestparseDeviceURItErrortqueryModelByURIt open_devicetgettHPMUD_UNI_MODEt get_device_idt parseDeviceIDt close_devicetlowerReRPtSUPPORT_TYPE_NONEt user_conftset(tparamtporttcups_uritsane_uritfax_uritfoundt result_codeturit match_objt usb_bus_idt usb_dev_idtdevicestdtback_endtis_hpRwtmodeltserialtdev_filethosttzctmqt device_idtdataRttscan_uri((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytmakeURI7s             +   ' cCstj|j}t|S(N(RtnormalizeModelNameRt model_dat(R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytqueryModelByModelsc CsYy+t|\ }}}}}}}}} Wntk rJttn Xt|SdS(N(RRtERROR_INVALID_DEVICE_URIR( R)RRRwRRRRRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRs + i iR&Rc. Csdi}}|rLytj|tj} WqLtjdd}qLXnx|D]x} tjd| | tkrtjd| qSn| dkr|dkrytj||} Wqt k r} | t _tjd| t qXn|d krOyt j||} Wqt k rK} | t _tjd| t qXnLyt j||} Wn3t k r} | t _tjd| t nXx-| D]} t| | jd d }| | jd d}| | jd d}|dkrxt|D]}}| | jd|dd}|dk r |dkr t|}tj|jdd }|dkr|dkrd|| f}qd||f}n=|dkrd|| |df}nd|||df}t}t|}|stjdt}nRt|jdttkrJtjdt}n|d%krht||}n|r|||f|||(D]3})|)j(}tjd!||)j)f|dkry+t$|\ }!}"}*}}$}%}&}'}Wn%t k rtjd"|qnX|"s%qnt}t|}|sSt}tjdnRt|jdttkrtjdt}n|d(krt||}n|r||df||RRRRARRCR+Rt __checkFilterR|tHPMUD_BUS_PARALLELt HPMUD_BUS_USBt probe_devicesR~t splitlinest direct_pattmatchRRR t getPrinterstlenR)tnameR{tcleanup_spinner(.RwttimeouttttltfilterR{t net_searchtback_end_filterRt ret_devicest search_pattbtdetected_devicest socket_errortipRtnum_devices_on_jdtnum_ports_on_jdRtdevRRR)tincludeRtbnRRtxtmRtmdltdesctdevidRRtbbRRRRt cups_printerstptbstprobed_devicest devid_or_hnR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRs                           '     +       #      +     $     c Csi}tj}tj|x|D]}y.t|j\ }}}}} } } } } Wntk rpq&nX|dks||ksd|kr&|dkr&|r&|r&t}t|}|stjdt }nRt |j dt t krtjdt }n|d kr-t||}n|rd|krW|jjd d }n |j}y ||Wn!tk r|jg||RRtKeyErrorRRK(RRRtprintersRRRRwRRRRRRRRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytgetSupportedCUPSDevicess>   .            c Cs)g}tj}x|D]}y.t|j\ }}}}} } } } } Wntk rcqnX|dks|||kr|r|rt}t|}|stjdt }nRt |j dt t krtjdt }n|dkrt||}n|r!|j|q!qqW|S(NRs Not found.s support-typesNot supported.Rs print-type(Nsprints print-type(R RRR)RRARR7R8RCR+RRR>RRK(RRt printer_listRRRRRwRRRRRRRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytgetSupportedCUPSPrinterss*  . $      cCs)t||}g|D]}|j^qS(N(RR(RRRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytgetSupportedCUPSPrinterNamessc Cs|dkrdSd}tj}x|D]}y.t|j\ }}}}} } } } } Wntk rsq)nX|r)|j|kr)|r|jjdd}n |j}Pq)q)W|S(Nshp:shpaio:(R>R RRR)RRR(R*t scan_uri_flagR)RRRRRwRRRRRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytgetDeviceURIByPrinterNames   .  cCsZi}g|jjdD]}|r|j^q}xm|D]e}|jd}y"|j|dj|dWqAtk r|j|djdqAXqAW|jdd|jddd|kr|d|d<|d=nd |kr|d |d<|d =n$d |kr6|d |d<|d =n|djd rVd|dt startswith(RRtyRtz((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRs,4 " "       cCs|jd\}}yUttjt|dp6d}|rittjt|dp`d}nWn2tk r|rd\}}qd\}}nX||fS(Nt RiR&(ii(iR&(RR+Rtxlstriptstrt ValueError(t ctr_fieldtconvert_to_inttcountertvalue((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytparseDynamicCounter s$+ c Cstj|}|dkr;tjd|ttn|jdjpSd}|dk}|jdjpzd}|dkrtjd|ttn|jd pd}|jdpd}|jdpd}|jdpd}|jdpd} |jdp$d} | r6| }n| rE| }n|jdpWd} |d kryt | } Wnt t fk rd} nX| dkrd} qntjd||||||||| | f |||||||| | f S(Ns Device URI %s is invalid/unknowniR&R$thpfaxRiRRtbttfwRiiiiiiisT%s: back_end:%s is_hp:%s bus:%s model:%s serial:%s dev_file:%s host:%s zc:%s port:%s(shpRshpaio(susbsnetRRspar( t pat_deviceuriRR>R7R8RRRRR+Rt TypeError( R)RRRRwRRRRRthostnameR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR4s>          &cCs |dkS(NRRRR(sparsusbsfwsbt((Rw((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytisLocal_scCs |dkS(NR(snet((Rw((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt isNetworkcscCsYxRt|jD]>\}}|dk r|\}}||||sQtSqqWtS(N(tlisttitemsR>RCRA(RRtfRtoptval((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRks    cCsKxD|D]<}|rt}nt}||krtjd|tSqWtS(NsInvalid bus name: %s(RtVALID_BUSES_WO_CUPSR7ReRCRA(Rwt allow_cupsRtvb((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytvalidateBusListus   cCsF|dkrtSx/|D]'}|tkrtjd|tSqWtS(Ns Invalid term '%s' in filter list(R>RAt VALID_FILTERSR7ReRC(RR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytvalidateFilterLists   tinvalidtblacktcmytkcmtcyantmagentatyellowt photo_cyant photo_magentat photo_yellowt photo_grayt photo_bluetkcmy_cmtphoto_cyan_and_photo_magentatlight_gray_and_photo_blackt light_grayt medium_graytcyan_and_magentatblack_and_yellowt photo_blackt matte_blackt unspecifiedtheadtsupplyt cartridgettonert maint_kittadf_kittdrum_kitt transfer_kittbatterytunknowntokt misinstalledt incorrecttfailedtovertemptchargingt dischargingtlowtouttDevicecBsLeZeeeedZddddZdZdZdZedZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.eed-Z/d.Z0eed/Z1d0Z2d1Z3e4j5d2Z6d3Z7e8d4Z9ee:j;ed5Z<ee:j;ed6Z=ee:j;ed7Z>ee:j;ed8Z?ee:j;e8d9Z@ee:j;e8d:ZAee:j;e8d;ZBee:j;e8d<ZCee:j;e8d=ZDee:j;e8d>ZEee:j;e8d?ZFd@dAZGee:j;edBZHdCZIdDZJdEZKdFZLdGZMdHZNdIZOdJZPdKZQdLZRdMZSdNZTdOe8dPZUdQZVeee8edRZWedSZXeee8edTZYedUZZee8e8dVZ[dWZ\dXZ]dYZ^ddZZ_dd[Z`dd\Zadd]Zbd^Zcd_Zdeed`ZeRS(ac Cstjd|tjd||a|sj|dkrUt\|_|_}q|t|_||_nt|_d|_d|_ t j }|dkr|dk rxV|D]?}|j j |j kr|j}tjd|PqqWttn||_||_t|_|jdkr;ttn|jjdrYt|_n<|jjdrwt|_n|jjdrt|_nyIt|j\ |_|_|_|_|_|_|_|_ |_!Wn&tk rt"|_#tt$nXtjd|j|j|j|j|j|j|j|j!ft%j&|j|_'t%j(|j|_tjd|j|j'f|jdkr|j|_)n d |_)i|_*i|_+d |_,g|_-i|_.d |_/d|_0d |_1t|_2t3|_#t4|j|_5g|_6t|_7|j8|j7swtj9d |jt:|_;|j<|j;n t|_7|j*j=i|jd6|j'd6t>|_?t@|_AtB|_C|jD|j*jEdtFtFkr|j+j=i|jjGddjGddd6n|j*jEdtHtHkri|j+j=i|jjGddjGddd6n|j+j=i|jd6|jd6|jd6|jd6|jd6|j!d6|j-d6|jCd6d d6d d 6d!d"6d d#6d d$6|jAd%6|j?d&6|jd'6|jjGddjGddd(6i|jd)6|jd*6|jjGddd+6|jjGddd,6|jjGddd-6|jId.6tJjKd/6|_LdS(0NsDevice URI: %ss Printer: %sshp:shpaio:shpfax:sPURI: backend=%s, is_hp=%s, bus=%s, model=%s, serial=%s, dev=%s, host=%s, port=%dsModel/UI model: %s/%sRt localhosttdefault_printeriR&sUnsupported model: %sRsmodel-uisfax-typeshp:/shpfax:/shpaio:/sfax-uris scan-typesscan-urisback-endsis-hpRsdev-fileRRs cups-printerss status-codes status-desctdeviceiditpanels panel-line1s panel-line2s device-states error-states device-uriscups-uritURIt DEVICE_URItSCAN_URItSANE_URItFAX_URItPRINTERtHOME(MR7R8R`R>RvRIRsRARCt last_eventR RRRR)RtERROR_DEVICE_NOT_FOUNDtcallbacktDEVICE_TYPE_UNKNOWNt device_typeRtDEVICE_TYPE_PRINTERtDEVICE_TYPE_SCANNERtDEVICE_TYPE_FAXRRRRwRRRRRRtIO_STATE_NON_HPtio_stateRRtnormalizeModelUINametmodel_uiRt http_hostRtdqticonRtchannelsRtr_valuestdeviceIDt panel_checktIO_STATE_HP_READYR tis_localthistt supportedt queryModelRetSTATUS_DEVICE_UNSUPPORTEDt error_codet sendEventtupdatetERROR_STATE_ERRORt error_statetDEVICE_STATE_NOT_FOUNDt device_statetEVENT_ERROR_DEVICE_NOT_FOUNDt status_codetupdateCUPSPrintersRt FAX_TYPE_NONERtSCAN_TYPE_NONEtfirst_cups_printerRURlt device_vars( R5R)R*RsROt disable_dbusRNRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR6s               I   8                     55            &   R&icCs|jr~|jdk r~y:tjd||jj|j||tj||Wq~t j j k rz}tjdq~XndS(NsSending event %d to hpssd...s dbus call to SendEvent() failed.( RIRsR>R7R8t SendEventR)RUR-RbRcRd(R5R,R*R.R/Rt((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRg`s )cCsdS(N((R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytquitiscCst|jst|j|_nt|j|_|jrpx4|jD]&}|j||j|jdd(R5Rf((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR_s"    cCsdS(N((R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytgetThreeBitStatuszscCs |jtjt|jS(N(RR t parseStatusRR(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytgetStatusFromDeviceID~s cCsut|}djddt||g}|d |d}}t|}||||f|_||||fS(NR&Ri i(RRkRR+R](R5tr_valuet r_value_strtrgtrr((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt__parseRValuess  # c Csd \}}}}|dkr |tkr |jdkr|jry"t|jj|jd}Wqtj j k r}t j dd}qXn|dkrt j d||j |\}}}}||||fSn|jdkr|tkr|jr|tkrzy|jd }|dk rt j d||j |\}}}}|jry|jj|jd|Wqtj j k r}t j d qXqnt jd d}Wn$tk rt jd d}nXWd|jXq|tkr"|tkr"|j s.|tkrz|jtj\} }|dk rt j d||j |\}}}}|jry|jj|jd|Wqtj j k r}t j d qXqnd}Wd|jXqq |j\}}}}n||||fS(Nit 000000000t000t000000Rs(dbus call to GetCachedIntValue() failed.is r_value=%dis(dbus call to SetCachedIntValue() failed.s%Error attempting to read r-value (2).s%Error attempting to read r-value (1).(iRRR(tSTATUS_DYNAMIC_COUNTERS_NONER]R>RIR+RstGetCachedIntValueR)RbRcRdR7R8t_Device__parseRValuest STATUS_TYPE_SRat STATUS_DYNAMIC_COUNTERS_PML_SNMPtgetDynamicCountertSetCachedIntValueReRRtSTATUS_DYNAMIC_COUNTERS_PCLRR t OID_R_SETTINGR( R5tr_typet status_typetdynamic_countersRRRRRtR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt getRValuessj   "                   c Cs|jjdt}t|_|tkr |jtkr8|jtt fkry|j Wqt k r}t j dt|jdttjddtj|_t tqXn|j|j}|jji |jd6|jd6|jd6|d6|jd 6dd 6dd 6dd 6|jd 6|jd6nt jdtj|\}}|rlt|_n|r~t |_nt!j|jt"|_|j|_#|j$|j#y1|jji|j|jd6|jd6Wn5t%t fk r|jjidd6t"d6nX|j&rEt'|jjdd|_&n|jjdt(}|j&r|t)t*t+fkr|tkrt jdztj,|\|_&} } Wd|j-X|jjit.|j&d 6| d 6| d 6n| r |r |j/q nx1|jD]&} |j| |j0| j1dd|j?|j>y.|jj i|j| d6|j$d6Wn5t;tfk r|jj idd6t=d6nXd}| r$|tkr$|j@rtA|j j d d|_@n|j@r|t,t't&fkr|tkrtj(d!zt)jB|\|_@}}Wd|jCX|jj itD|j@d6|d6|d6n|tkr|tkr|jE|||\}}}}ndX\}}}}|jj i|d%6|d&6|d'6|d(6n| r>|r>|jFn|s |dkr|j j d)|ddkrd}|jj i|d%6|d&6|d'6|d(6ntG}x6| D].}y|d*dkrtH}PnWqqXqWdY\}}xtHr |rI|tI| krPn| |d+}|d*}|d,}|d-}tH}n|j j d.||fd/}|d/krxPn|j j d0||fd}|j j d1||fd}tG}tj(d2||fxD| D]<}|d,}|d-}||kr||krtH}PqqW|r tj(d3|||f|j d4tJ}|j d5d6} |j d7tK}!tj(d8|| |!| fd9tLj |d:tMj |d:f}"|j|"}#d;}"| tNks| tOks| tPkr |tJks |tQkr |tRkr |!tSkr d<tTj |!d:}"|ttfkrS |tU}$n |tV}$|$|jd <|j|$|jd|j?|j>|!tXtYfkr d=}"nd>}"|j|"}%|jj i|d?|6|d@|6|j dAtGdB|6|dC|6| dD|6|!dE|6|j dFtGdG|6|j dHtGdI|6|dJ|6|j dKddL|6|j dMtGdN|6|#dO|6|j dPddQ|6|%dR|6ndStZj |tJ}"|j|"}%|jj i|d?|6|d@|6tGdB|6|dC|6| dD|6|!dE|6tGdG|6tGdI|6|dJ|6ddL|6tGdN|6|#dO|6ddQ|6|%dR|6|d+7}ntj(dT||d+7}qWq nd}|dkr |j[dk r |j[d}n|dkr9 |j j d)ddkr9 d}nd+}xktHr |j j d.||fd}|dkrw Pn|j j d0||fd}|j j d1||fd}d9tLj |d:tMj |d:f}"|j|"}#|jj i|d?|6|d@|6tGdB|6|dC|6ddD|6tYdE|6tGdG|6tGdI|6t]dJ|6ddL|6tGdN|6|jdUdR|6|#dO|6ddQ|6|d+7}qB Wx1|jD]&}&|j|&|j^|&j_dVdWtAGENT_HEALTH_MISINSTALLEDRzR('R5RRRRRt battery_checkRRt io_mfp_modeRnRRtRt status_blockRRRRRRtdynamic_sku_datatagenttataat mq_agent_skut agent_kindt agent_typeRt mq_agent_kindt mq_agent_typet agent_healtht agent_leveltagent_level_triggertqueryt agent_desctcodetagent_health_descR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt queryDeviceHs                                !      $  +                $                              '                $-cCs<y|jdtWntk r(tSX|jttfkS(NR(R;RARRjRitERROR_STATE_BUSY(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytisBusyOrInErrorStates  cCs<y|jdtWntk r(tSX|jttfkS(NR(R;RARRCRjRiR<(R5((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytisIdleAndNoErrors  c Cs|j}tj|j|tj|d|d\}}}}|tjkrxtjd|d|f|dfStj ||d|}tj r |dtj tj fkrtjd|d|ftj|q tjd|d|t|fn||fS(Niis+PML/SNMP GET %s failed (result code = 0x%x)s.PML/SNMP GET %s (result code = 0x%x) returned:s1PML/SNMP GET %s (result code = 0x%x) returned: %s(RR|tget_pmlRR t PMLToSNMPt ERROR_MAX_OKR7R8R>tConvertFromPMLDataFormattis_debugt TYPE_STRINGt TYPE_BINARYtlog_datatrepr( R5toidtdesired_int_sizeRRRttyptpml_result_codetconverted_data((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRs 8    cCs|j}tj||d}tj|j|tj|d|d|\}}tjr|dtj tj fkrtj d|d|fqtj d|d|t |j dfn|S(Niis(PML/SNMP SET %s (result code = 0x%x) to:s+PML/SNMP SET %s (result code = 0x%x) to: %ssutf-8(RR tConvertToPMLDataFormatR|tset_pmlRR@R7RCRDRER8RGtdecode(R5RHRRRRK((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytsetPMLs 5   'c Cs^|jjdt}tjd||tkrN|tkrv|jtjdt |jtj |dt n|jt j |dt d \}}}}}t jdxt rJ|jr|jn|d7}|d7}t j||jd|jkrtj|jdk rt|jd|\} }|| kr|jt j ddt |s|d |}n|Sn||kr|tkr|jtj|jtj |dt n|jt j ddt dS|tkr+|jtj|jtj |dt q|jt j |dt qWn ttdS( Nsstatus-dynamic-counterssDynamic counters: %dtdirectig?iitCTRt#(iiig?i(RRRR7R8t#STATUS_DYNAMIC_COUNTERS_LIDIL_0_5_4t printDataR tbuildResetPacketRAtbuildDynamicCountersPacketR tbuildDynamicCounterR2RqRORR^tpat_dynamic_ctrR{RR>RRt'ERROR_DEVICE_DOES_NOT_SUPPORT_OPERATION( R5RRRRttriest times_seent sleepy_timet max_triest dev_counter((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRsF               #cCs|j|j||||S(N(t_Device__readChannelR(R5t bytes_to_readtstreamRtallow_short_read((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt readPrintscCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt readPCard"scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytreadFax%scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt readCfgUpload(scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytreadEWS+scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt readEWS_LEDM.scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytreadLEDM1scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytreadMarvell_EWS4scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt readSoapFax7scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytreadMarvellFax:scCs|j|j||||S(N(R`R(R5RaRbRRc((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytreadWifiConfig=sic CsYtd}d}d}t}||||}xd|jjD]P} | jjtddkrCt| jtdd}t}PqCqCW|jjtd} | dkr|t |j| }nxw|dkrTt } ||| |}|j | j|s;||}|dkrQPqQq|| jkrPqqWdS( Ns0 iiscontent-lengthiRisRRAR|t read_channelRtHPMUD_R_IO_TIMEOUTR~ReRRRkR@RO( R5topenerRaRbRRcRt num_bytestbufferRRtl((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt __readChannelcsH    !           cCs|j|j|S(N(t_Device__writeChannelR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt writePrintscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt writePCardscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytwriteFaxscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytwriteEWSscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt writeEWS_LEDMscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt writeLEDMscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytwriteMarvell_EWSscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytwriteCfgDownloadscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt writeSoapFaxscCsAt|t r.t|dr.|j}n|j|j|S(Nttobytes(t isinstancetbytesthasattrRRR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytwriteMarvellFaxscCs|j|j|S(N(RR(R5R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytwriteWifiConfigsc Cs |}|dt|}}}tjd|||jfxt|dkrtj|j||tj \}}tjd||tjkrtj dt t n|tj}||7}|j dk rC|j qCqCW||krt t n|S(Nis0Writing %d bytes to channel %d (device-id=%d)...sResult code=%dsChannel write error(RR7R8RR|t write_channelRUtmax_message_lenR~ReRRROR>( R5R~RRRt bytes_outttotal_bytes_to_writeRR^((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt__writeChannels"     ic Css|dkrtj}n tj}|tjdddtj|d||d}|j|d|dtdS(Nit&RtWiRQtraw(R tbuildEmbeddedPML2tbuildEmbeddedPMLt buildPCLCmdR tbuildEmbeddedPMLSetPacketRURA(R5RHRtstyleRQRqR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytwriteEmbeddedPMLs    cCs|jjdt}d||jt||f}tj||tkrtjd||j |t }|j |j ||j }tj||jn}|tkrtjd||j|t }|j |j||j }tj||jntjd|tjt|}|dkrOtSyt|jd}Wnttfk rt}nX|tkS(Ns status-types{POST %s HTTP/1.1 Connection: Keep-alive User-agent: hplip/2.0 Host: %s Content-type: text/xml Content-length: %d %ssstatus-type: %dsNot an LEDM status-type: %di(RRRRYRR7RFRR8RRR{RiRoRRRRjRRethttp_result_patRRR>tHTTP_OKR+RRR t HTTP_ERROR(R5turltpostRRtresponseRR9((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRs8               cCs|j|||||S(N(t printFile(R5t file_nameR*RQRtremove((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt printGzipFile sc Csytj|Wn#tk r6tjd|dSXtj\}}tj|d}|j }x5|j t dstj |||j }qjWg}|j }x2|j t ds|j ||j }qWitjd6|jd6|jd6|jd6|jd 6|jd 6|jd 6|jd 6}|jd krXd|d RrRt$ERROR_NO_CUPS_QUEUE_FOUND_FOR_DEVICER7R8RRRRRRiRtexecuteReR( R5RR*RQRRtis_gziptlp_optRt exit_codetraw_strtrem_str((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRP sD"   "      cCs(|jtjjtjddd|S(NRtpsstestpage.ps.gz(RR?RjRkRURl(R5R*((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt printTestPage scCse|r|j|nKtj\}}tj||tj||j||t|dtdS(NR( RRRR?R@RRRCRA(R5RR*RQRRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRU s  cCs*tj|t|_|j|jdS(N(R t cancelJobtSTATUS_PRINTER_CANCELINGRfRg(R5tjobid((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR s  cCsg}|jry|jj|j\}}Wn'tjjk rW}tjdgSX|j x'|D]}|j t t |qiWy|dj |_Wntk rt|_nXtj|jt|_nt|_t|_||_|S(Ns!dbus call to GetHistory() failed.i(RIRst GetHistoryR)RbRcRdR7RetreverseRKR%ttupleR,RfRRRRRRjRb(R5tresultR)thistoryRtth((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt queryHistory s&         c Cs=z+|jr4d|jjdd|f}|}n_d|j|f}|jrtj|j\}}|tjkrd||f}qnd}t j d|t i}y|j ||}Wn9t k rt jd||jd|jn)Xz|j|jjWd|jXWd|jXdS(Ns %s&loc=%sshpfax:shp:s http://%s%ss Opening: %ssStatus read failed: %si(RaR)RRRR|tget_zc_ip_addressR~R>R7R8t LocalOpenerRRRetseekttruncateR@tfpRRR( R5RRbturl2RR RR~R((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt getEWSUrl s,      cCszd|jjdd|f}|}ti}y-|rP|j|||S|j||SWn"tk rtjd|nXWd|jXdS(Ns %s&loc=%sshpfax:shp:sStatus read failed: %s(R)RtLocalOpenerEWS_LEDMtopen_hpRR7R8R(R5RRbtfooterRRR~((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR s  cCszd|jjdd|f}|}ti}y-|rP|j|||S|j||SWn"tk rtjd|nXWd|jXdS(Ns %s&loc=%sshpfax:shp:sStatus read failed: %s(R)RtLocalOpener_LEDMRRR7R8R(R5RRbRRRR~((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR s  cCszt}|r'|j|||}n|j||}|rv|jtddd}|rvtj|}qvn|S(Ns i(RRRRR tExtractXMLData(R5RRtdata_fpR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyt FetchLEDMUrl s cCszt}|r'|j|||}n|j||}|rv|jtddd}|rvtj|}qvn|S(Ns i(RRRRR R(R5RRRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytFetchEWS_LEDMUrl s cCset}|j|}|s/tjddStjj|}y ||SWntdSXdS(Ns'Unable To read the XML data from deviceR&(RRR7ReRtXMLToDictParsertparseXMLR(R5Rt attributeRbRtxmlDict((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytreadAttributeFromXml_EWS s   cCset}|j|}|s/tjddStjj|}y ||SWntdSXdS(Ns'Unable To read the XML data from deviceR&(RRR7ReRRRR(R5RRRbRR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytreadAttributeFromXml! s   cCst}tjjtjd|jjd}tj |tjj |rtj d|yc|j |j t j|j}tj dtj||jt}tj dWqtk r}tjd|jqXntjd||S(Ntfirmwares.fw.gzs!Downloading firmware file '%s'...s%s bytes downloaded.tOKsAn error occured: %ssFirmware file '%s' not found.(RCR?RjRkRUtdata_dirRRR7R8RmRRRRRRtcommafyRRARReRP(R5Rt usb_device_idR8tfilenameR^Rt((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pytdownloadFirmware. s (   (fRSRTR>RCR6RgRvRdR{RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRoR;R=R>R t INT_SIZE_INTRRPRARRUt read_timeoutRdReRfRgRhRiRjRkRlRmRnR{R`RRRRRRRRRRRRRRRRRRRURRRRRRRRRR(((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRAs   6  !                                  OW h    8 ":             - 46        RcBseZdZRS(c Cs.tjd|tj|}|jdp2d}|jdpGd}|jdp\d}|jdpqd}|jdpd}|j|jd|t} x|jd | d drqW| j d tj | j t j | } | j| jt jkr&ttn| SdS( Ns open_hp(%s)iR&iiiisBGET %s HTTP/1.0 Content-Length:0 Host:localhost User-Agent:hplip i Ri(R7R8t http_pat_urlR{RRRRRhRRFRoRt HTTPResponsetbeginR RRt!ERROR_DEVICE_STATUS_NOT_AVAILABLE( R5RRRRwRRtdevicetlocRrR((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRZ s&    (RSRTR(((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRY sRcBseZddZRS(R&cCstjd|tj|}|jd|jd}|j|rd|krl|jd|q|jd|t|f|jd|n|jd|t }|j |j ||j d|j S(Ns open_hp(%s)t=tPUTs%ssyPOST %s HTTP/1.1 Content-Type:text/xml Content-Length:%s Accept-Encoding: UTF-8 Host:localhost User-Agent:hplip sIGET %s HTTP/1.1 Accept: text/plain Host:localhost User-Agent:hplip i(R7R8RR{RtcountRRRRR{RiRRo(R5RRtfootRRRr((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRx s    (RSRTR(((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyRw sRcBseZddZRS(R&cCstjd|tj|}|jd|jd}|j|rd|krl|jd|q|jd|t|f|jd|n|jd|t }|j |j ||j d|j S(Ns open_hp(%s)RRs%ssyPOST %s HTTP/1.1 Content-Type:text/xml Content-Length:%s Accept-Encoding: UTF-8 Host:localhost User-Agent:hplip sIGET %s HTTP/1.1 Accept: text/plain Host:localhost User-Agent:hplip i(R7R8RR{RRRRRRR{RjRRo(R5RRRRRRr((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR s    (RSRTR(((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyR s(RRRtos.pathR?R2t sixext.movesRRRtioRRR9tstringtgtcodesR&RRRR R tprntR R R RRRRtstringstsixextRRRRRRRtIRRRR|t ImportErrortgetenvR7RetsystexittHPMUD_BUFFER_SIZEt MAX_BUFFERtAttributeErrorRCRIR`RbRRRARntwarningst simplefiltertDeprecationWarningtDEFAULT_PROBE_BUSRRR>tDEFAULT_FILTERRtDEFAULT_BE_FILTERRRRRRYt ModelDataRRRzRtobjectR%RVR[RvRRRRRRRRRRRR R RRRtAGENT_TYPE_NONEtAGENT_TYPE_BLACKtAGENT_TYPE_BLACK_B8800tAGENT_TYPE_CMYtAGENT_TYPE_KCMtAGENT_TYPE_CYANtAGENT_TYPE_MAGENTAtAGENT_TYPE_YELLOWtAGENT_TYPE_CYAN_LOWtAGENT_TYPE_MAGENTA_LOWtAGENT_TYPE_YELLOW_LOWtAGENT_TYPE_GGKtAGENT_TYPE_BLUEtAGENT_TYPE_KCMY_CMtAGENT_TYPE_LC_LMtAGENT_TYPE_LG_PKt AGENT_TYPE_LGt AGENT_TYPE_Gt AGENT_TYPE_PGtAGENT_TYPE_C_MtAGENT_TYPE_K_YtAGENT_TYPE_PHOTO_BLACKtAGENT_TYPE_MATTE_BLACKtAGENT_TYPE_UNSPECIFIEDRtAGENT_KIND_NONERtAGENT_KIND_SUPPLYtAGENT_KIND_HEAD_AND_SUPPLYtAGENT_KIND_TONER_CARTRIDGEtAGENT_KIND_MAINT_KITtAGENT_KIND_ADF_KITtAGENT_KIND_DRUM_KITtAGENT_KIND_TRANSFER_KITtAGENT_KIND_INT_BATTERYtAGENT_KIND_UNKNOWNRRR'tAGENT_HEALTH_INCORRECTtAGENT_HEALTH_FAILEDtAGENT_HEALTH_OVERTEMPtAGENT_HEALTH_CHARGINGtAGENT_HEALTH_DISCHARGINGR&RR$R%R t string_cacheRAt URLopenerRRR(((s[/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/device.pyts           " .           E S   /"  #  +