Changeset 7e29e6a


Ignore:
Timestamp:
Jan 21, 2012, 8:27:33 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
no-cups
Children:
441604f
Parents:
5e70cc2
git-author:
Jessica B. Hamrick <jhamrick@…> (01/21/12 20:27:33)
git-committer:
Jessica B. Hamrick <jhamrick@…> (01/21/12 20:27:33)
Message:

Fix a few small bugs in printer.py

File:
1 edited

Legend:

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

    r5e70cc2 r7e29e6a  
    124124
    125125    @property
     126    def name(self):
     127        return self._name
     128    @name.setter
     129    def name(self, val):
     130        try:
     131            self._name = str(val)
     132        except:
     133            self._name = "gutenbach-printer"
     134
     135    @property
     136    def config(self):
     137        return self._config
     138    @config.setter
     139    def config(self, val):
     140        try:
     141            _config = dict(val).copy()
     142        except:
     143            raise ValueError, "not a dictionary"
     144        if 'ipp-versions' not in _config:
     145            raise ValueError, "missing ipp-versions"
     146        self._config = _config
     147
     148    @property
    126149    def uris(self):
    127150        uris = ["ipp://localhost:8000/printers/" + self.name,
     
    457480
    458481    @sync
    459     def verify_job(self, document_name=None, document_format=None,
    460                   document_natural_language=None, requesting_user_name=None,
    461                   compression=None, job_name=None, job_k_octets=None):
     482    def validate_job(self, document_name=None, document_format=None,
     483                     document_natural_language=None, requesting_user_name=None,
     484                     compression=None, job_name=None, job_k_octets=None):
    462485
    463486        self.assert_running()
     
    567590
    568591    @sync
    569     def set_printer_attributes(self, job_id, attributes):
     592    def set_printer_attributes(self, attributes):
    570593        self.assert_running()
    571594        for attr in attributes:
Note: See TracChangeset for help on using the changeset viewer.