Changeset eee389a for server/lib/gutenbach/server/errors.py
- Timestamp:
- Jan 11, 2012, 3:13:30 PM (12 years ago)
- Branches:
- no-cups
- Children:
- d21198f
- Parents:
- be6ff03
- git-author:
- Jessica B. Hamrick <jhamrick@…> (01/11/12 15:13:30)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (01/11/12 15:13:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/gutenbach/server/errors.py
rb01b6d1 reee389a 3 3 'InvalidPrinterStateException', 4 4 'InvalidJobStateException', 5 'MissingDataException' 5 6 ] 6 7 … … 18 19 19 20 class InvalidJobStateException(Exception): 21 errstr = { 22 3: "pending", 23 4: "held", 24 5: "processing", 25 6: "stopped", 26 7: "cancelled", 27 8: "aborted", 28 9: "complete" 29 } 30 20 31 def __init__(self, state): 21 self.state = hex(state)32 self.state = int(state) 22 33 def __str__(self): 23 return "Invalid job state: %s" % self.state 34 return "Invalid job state: %s (%s)" % \ 35 (self.errstr[self.state], hex(self.state)) 36 37 class MissingDataException(Exception): 38 pass
Note: See TracChangeset
for help on using the changeset viewer.