Ignore:
Timestamp:
Jan 11, 2012, 12:51:51 AM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
no-cups
Children:
be6ff03
Parents:
ffbe41d
git-author:
Jessica B. Hamrick <jhamrick@…> (01/11/12 00:51:51)
git-committer:
Jessica B. Hamrick <jhamrick@…> (01/11/12 00:51:51)
Message:

Clean up printer, job, and requests code

File:
1 edited

Legend:

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

    re58af05 rb01b6d1  
    11__all__ = [
    22    'InvalidJobException',
    3     'InvalidPrinterStateException'
     3    'InvalidPrinterStateException',
     4    'InvalidJobStateException',
    45    ]
    56
     
    78    def __init__(self, jobid):
    89        self.jobid = jobid
    9 
    1010    def __str__(self):
    11         return "Job with id '%d' does not exist!" % self.jobid
     11        return "Job does not exist: %d" % self.jobid
    1212
    1313class InvalidPrinterStateException(Exception):
    14     def __init__(self, message):
    15         self.message = message
     14    def __init__(self, state):
     15        self.state = hex(state)
     16    def __str__(self):
     17        return "Invalid printer state: %s" % self.state
    1618
     19class InvalidJobStateException(Exception):
     20    def __init__(self, state):
     21        self.state = hex(state)
    1722    def __str__(self):
    18         return self.message
     23        return "Invalid job state: %s" % self.state
Note: See TracChangeset for help on using the changeset viewer.