Exemple #1
0
def cancelJob(jobid, dest=None):
    setPasswordPrompt("You do not have permission to cancel a job.")
    if dest is not None:
        return cupsext.cancelJob(dest, jobid)
    else:
        jobs = cupsext.getJobs(0, 0)
        for j in jobs:
            if j.id == jobid:
                return cupsext.cancelJob(j.dest, jobid)

    return False
Exemple #2
0
def cancelJob(jobid, dest=None):
    setPasswordPrompt("You do not have permission to cancel a job.")
    if dest is not None:
        return cupsext.cancelJob(dest, jobid)
    else:
        jobs = cupsext.getJobs(0, 0)
        for j in jobs:
            if j.id == jobid:
                return cupsext.cancelJob(j.dest, jobid)

    return False