no-cups
Last change
on this file since b01b6d1 was
b01b6d1,
checked in by Jessica B. Hamrick <jhamrick@…>, 12 years ago
|
Clean up printer, job, and requests code
|
-
Property mode set to
100644
|
File size:
644 bytes
|
Line | |
---|
1 | __all__ = [ |
---|
2 | 'InvalidJobException', |
---|
3 | 'InvalidPrinterStateException', |
---|
4 | 'InvalidJobStateException', |
---|
5 | ] |
---|
6 | |
---|
7 | class InvalidJobException(Exception): |
---|
8 | def __init__(self, jobid): |
---|
9 | self.jobid = jobid |
---|
10 | def __str__(self): |
---|
11 | return "Job does not exist: %d" % self.jobid |
---|
12 | |
---|
13 | class InvalidPrinterStateException(Exception): |
---|
14 | def __init__(self, state): |
---|
15 | self.state = hex(state) |
---|
16 | def __str__(self): |
---|
17 | return "Invalid printer state: %s" % self.state |
---|
18 | |
---|
19 | class InvalidJobStateException(Exception): |
---|
20 | def __init__(self, state): |
---|
21 | self.state = hex(state) |
---|
22 | def __str__(self): |
---|
23 | return "Invalid job state: %s" % self.state |
---|
Note: See
TracBrowser
for help on using the repository browser.