Ignore:
Timestamp:
Dec 23, 2011, 9:04:31 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
no-cups
Children:
793432f
Parents:
aded2d1
git-author:
Jessica B. Hamrick <jhamrick@…> (12/23/11 21:04:31)
git-committer:
Jessica B. Hamrick <jhamrick@…> (12/23/11 21:04:31)
Message:

Use classes for standard IPP attributes

File:
1 edited

Legend:

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

    raded2d1 rb828a96  
    5353        except ipp.errors.IPPException:
    5454            exctype, excval, exctb = sys.exc_info()
    55             logger.error(traceback.format_exc())
     55            logger.error("%s: %s" % (exctype.__name__, excval.message))
    5656            response = ipp.ops.make_empty_response(request)
    5757            excval.update_response(response)
     
    8686        """
    8787       
    88         raise NotImplementedError
     88        raise ipp.errors.ServerErrorOperationNotSupported
    8989
    9090    @handler_for(consts.Operations.VALIDATE_JOB)
    9191    def validate_job(self, request):
    9292
    93         raise NotImplementedError
     93        raise ipp.errors.ServerErrorOperationNotSupported
    9494
    9595    @handler_for(consts.Operations.GET_JOBS)
     
    129129    @handler_for(consts.Operations.PRINT_URI)
    130130    def print_uri(self, request):
    131         raise NotImplementedError
     131        raise ipp.errors.ServerErrorOperationNotSupported
    132132
    133133    @handler_for(consts.Operations.CREATE_JOB)
     
    181181        """
    182182
    183         raise NotImplementedError
     183        raise ipp.errors.ServerErrorOperationNotSupported
    184184   
    185185    @handler_for(consts.Operations.PAUSE_PRINTER)
    186186    def pause_printer(self, request):
    187         raise NotImplementedError
     187        raise ipp.errors.ServerErrorOperationNotSupported
    188188
    189189    @handler_for(consts.Operations.RESUME_PRINTER)
    190190    def resume_printer(self, request):
    191         raise NotImplementedError
     191        raise ipp.errors.ServerErrorOperationNotSupported
    192192
    193193    @handler_for(consts.Operations.GET_PRINTER_ATTRIBUTES)
     
    252252    @handler_for(consts.Operations.SET_PRINTER_ATTRIBUTES)
    253253    def set_printer_attributes(self, request):
    254         raise NotImplementedError
     254        raise ipp.errors.ServerErrorOperationNotSupported
    255255
    256256    ##### Job Commands
     
    258258    @handler_for(consts.Operations.CANCEL_JOB)
    259259    def cancel_job(self, request):
    260         raise NotImplementedError
     260        raise ipp.errors.ServerErrorOperationNotSupported
    261261
    262262    @handler_for(consts.Operations.SEND_DOCUMENT)
    263263    def send_document(self, request):
    264         raise NotImplementedError
     264        raise ipp.errors.ServerErrorOperationNotSupported
    265265
    266266    @handler_for(consts.Operations.SEND_URI)
    267267    def send_uri(self, request):
    268         raise NotImplementedError
     268        raise ipp.errors.ServerErrorOperationNotSupported
    269269
    270270    @handler_for(consts.Operations.GET_JOB_ATTRIBUTES)
     
    297297    @handler_for(consts.Operations.SET_JOB_ATTRIBUTES)
    298298    def set_job_attributes(self, request):
    299         raise NotImplementedError
     299        raise ipp.errors.ServerErrorOperationNotSupported
    300300
    301301    @handler_for(consts.Operations.RESTART_JOB)
    302302    def restart_job(self, request):
    303         raise NotImplementedError
     303        raise ipp.errors.ServerErrorOperationNotSupported
    304304
    305305    @handler_for(consts.Operations.PROMOTE_JOB)
    306306    def promote_job(self, request):
    307         raise NotImplementedError
     307        raise ipp.errors.ServerErrorOperationNotSupported
    308308
    309309    ##### CUPS Specific Commands
     
    311311    @handler_for(consts.Operations.CUPS_GET_DOCUMENT)
    312312    def cups_get_document(self, request):
    313         raise NotImplementedError
     313        raise ipp.errors.ServerErrorOperationNotSupported
    314314
    315315    @handler_for(consts.Operations.CUPS_GET_DEFAULT)
Note: See TracChangeset for help on using the changeset viewer.