Exemplo n.º 1
0
            except Error:
                log.error("Unable to print to printer. Please check device and try again.")
                sys.exit(1)

            if d.isIdleAndNoError():
                clean_type = d.mq.get('clean-type', CLEAN_TYPE_NONE)
                log.debug("Clean type=%d" % clean_type)
                d.close()

                try:
                    if clean_type == CLEAN_TYPE_UNSUPPORTED:
                        log.error("Cleaning through HPLIP not supported for this printer. Please use the printer's front panel to perform cartridge cleaning.")

                    elif clean_type == CLEAN_TYPE_PCL:
                        maint.cleaning(d, clean_type, maint.cleanType1, maint.primeType1,
                                        maint.wipeAndSpitType1, tui.load_paper_prompt,
                                        CleanUI1, CleanUI2, CleanUI3,
                                        None)

                    elif clean_type == CLEAN_TYPE_LIDIL:
                        maint.cleaning(d, clean_type, maint.cleanType2, maint.primeType2,
                                        maint.wipeAndSpitType2, tui.load_paper_prompt,
                                        CleanUI1, CleanUI2, CleanUI3,
                                        None)

                    elif clean_type == CLEAN_TYPE_PCL_WITH_PRINTOUT:
                        maint.cleaning(d, clean_type, maint.cleanType1, maint.primeType1,
                                        maint.wipeAndSpitType1, tui.load_paper_prompt,
                                        CleanUI1, CleanUI2, CleanUI3,
                                        None)

                    else:
Exemplo n.º 2
0
            except Error:
                log.error("Unable to print to printer. Please check device and try again.")
                sys.exit(1)

            if d.isIdleAndNoError():
                clean_type = d.mq.get('clean-type', CLEAN_TYPE_NONE)
                log.debug("Clean type=%d" % clean_type)
                d.close()

                try:
                    if clean_type == CLEAN_TYPE_UNSUPPORTED:
                        log.error("Cleaning through HPLIP not supported for this printer. Please use the printer's front panel to perform cartridge cleaning.")

                    elif clean_type == CLEAN_TYPE_PCL:
                        maint.cleaning(d, clean_type, maint.cleanType1, maint.primeType1,
                                        maint.wipeAndSpitType1, tui.load_paper_prompt,
                                        CleanUI1, CleanUI2, CleanUI3,
                                        None)

                    elif clean_type == CLEAN_TYPE_LIDIL:
                        maint.cleaning(d, clean_type, maint.cleanType2, maint.primeType2,
                                        maint.wipeAndSpitType2, tui.load_paper_prompt,
                                        CleanUI1, CleanUI2, CleanUI3,
                                        None)

                    elif clean_type == CLEAN_TYPE_PCL_WITH_PRINTOUT:
                        maint.cleaning(d, clean_type, maint.cleanType1, maint.primeType1,
                                        maint.wipeAndSpitType1, tui.load_paper_prompt,
                                        CleanUI1, CleanUI2, CleanUI3,
                                        None)

                    elif clean_type == CLEAN_TYPE_LEDM:
Exemplo n.º 3
0
            if d.isIdleAndNoError():
                clean_type = d.mq.get('clean-type', CLEAN_TYPE_NONE)
                log.debug("Clean type=%d" % clean_type)
                d.close()

                try:
                    if clean_type == CLEAN_TYPE_UNSUPPORTED:
                        log.error(
                            "Cleaning through HPLIP not supported for this printer. Please use the printer's front panel to perform cartridge cleaning."
                        )

                    elif clean_type == CLEAN_TYPE_PCL:
                        maint.cleaning(d, clean_type, maint.cleanType1,
                                       maint.primeType1,
                                       maint.wipeAndSpitType1,
                                       tui.load_paper_prompt, CleanUI1,
                                       CleanUI2, CleanUI3, None)

                    elif clean_type == CLEAN_TYPE_LIDIL:
                        maint.cleaning(d, clean_type, maint.cleanType2,
                                       maint.primeType2,
                                       maint.wipeAndSpitType2,
                                       tui.load_paper_prompt, CleanUI1,
                                       CleanUI2, CleanUI3, None)

                    elif clean_type == CLEAN_TYPE_PCL_WITH_PRINTOUT:
                        maint.cleaning(d, clean_type, maint.cleanType1,
                                       maint.primeType1,
                                       maint.wipeAndSpitType1,
                                       tui.load_paper_prompt, CleanUI1,