Esempio n. 1
0
                    cleanup_spinner()

                    if err:
                        log.error(repr(err))

                else:
                    log.error("Mail send failed. 'sendmail' not found.")

            elif d == 'viewer':
                if viewer:
                    log.info("Viewing file in %s" % viewer)
                    os.system("%s %s &" % (viewer, output))
                else:
                    log.error("Viewer not found.")

            elif d == 'editor':
                if editor:
                    log.info("Editing file in %s" % editor)
                    os.system("%s %s &" % (editor, output))
                else:
                    log.error("Editor not found.")

        device.freeScan()
        sane.deInit()

except KeyboardInterrupt:
    log.error("User exit")

log.info("")
log.info("Done.")
Esempio n. 2
0
                    if err:
                        log.error(repr(err))

                else:
                    log.error("Mail send failed. 'sendmail' not found.")

            elif d == 'viewer':
                if viewer:
                    log.info("Viewing file in %s" % viewer)
                    os.system("%s %s &" % (viewer, output))
                else:
                    log.error("Viewer not found.")

            elif d == 'editor':
                if editor:
                    log.info("Editing file in %s" % editor)
                    os.system("%s %s &" % (editor, output))
                else:
                    log.error("Editor not found.")

        device.freeScan()
        sane.deInit()


except KeyboardInterrupt:
    log.error("User exit")

log.info("")
log.info("Done.")