Ignore:
Timestamp:
Jan 11, 2012, 3:13:30 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
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)
Message:

Better threading model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/gutenbach/server/errors.py

    rb01b6d1 reee389a  
    33    'InvalidPrinterStateException',
    44    'InvalidJobStateException',
     5    'MissingDataException'
    56    ]
    67
     
    1819
    1920class 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   
    2031    def __init__(self, state):
    21         self.state = hex(state)
     32        self.state = int(state)
    2233    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
     37class MissingDataException(Exception):
     38    pass
Note: See TracChangeset for help on using the changeset viewer.