def addPrinter(printer_name, device_uri, location, ppd_file, model, info): log.debug("addPrinter('%s', '%s', '%s', '%s', '%s', '%s')" % ( printer_name, device_uri, location, ppd_file, model, info)) if ppd_file and not os.path.exists(ppd_file): log.error("PPD file '%s' not found." % ppd_file) return (-1, "PPD file not found") return cupsext.addPrinter(printer_name, device_uri, location, ppd_file, model, info)
def addPrinter(printer_name, device_uri, location, ppd_file, model, info): setPasswordPrompt("You do not have permission to add a printer. You need authentication.") log.debug("addPrinter('%s', '%s', '%s', '%s', '%s', '%s')" % ( printer_name, device_uri, location, ppd_file, model, info)) if ppd_file and not os.path.exists(ppd_file): log.error("PPD file '%s' not found." % ppd_file) return (-1, "PPD file not found") return cupsext.addPrinter(printer_name, device_uri, location, ppd_file, model, info)