Changeset 3cb6c7b
- Timestamp:
- Jan 21, 2012, 9:49:00 PM (12 years ago)
- Branches:
- no-cups
- Children:
- d42236e
- Parents:
- b77e57e
- git-author:
- Daniel Cooper <danny@…> (01/21/12 21:49:00)
- git-committer:
- Daniel Cooper <danny@…> (01/21/12 21:49:00)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/gutenbach/server/requests.py
rb77e57e r3cb6c7b 683 683 684 684 """ 685 raise ipp.errors.ServerErrorOperationNotSupported 685 operation = request.attribute_groups[0] 686 printer_uri = None 687 user_name = None 688 if 'printer-uri' not in operation: 689 raise ipp.errors.ClientErrorBadRequest("Missing 'printer-uri' attribute") 690 printer_uri = verify_attribute(operation['printer-uri'], ipp.PrinterUri)[0] 691 if printer_uri not in self.printer.uris: 692 raise ipp.errors.ClientErrorAttributes( 693 str(operation['printer-uri']), operation['printer-uri']) 694 695 if 'requesting-user-name' in operation: 696 user_name = verify_attribute( 697 operation['requesting-user-name'], ipp.RequestingUserName)[0] 698 self.printer.pause_printer() 699 700 701 # raise ipp.errors.ServerErrorOperationNotSupported 686 702 687 703 @handler_for(ipp.OperationCodes.RESUME_PRINTER) … … 732 748 sections 3.2.7.1 and 3.2.7.2). 733 749 """ 734 raise ipp.errors.ServerErrorOperationNotSupported 750 operation = request.attribute_groups[0] 751 printer_uri = None 752 user_name = None 753 if 'printer-uri' not in operation: 754 raise ipp.errors.ClientErrorBadRequest("Missing 'printer-uri' attribute") 755 printer_uri = verify_attribute(operation['printer-uri'], ipp.PrinterUri)[0] 756 if printer_uri not in self.printer.uris: 757 raise ipp.errors.ClientErrorAttributes( 758 str(operation['printer-uri']), operation['printer-uri']) 759 760 if 'requesting-user-name' in operation: 761 user_name = verify_attribute( 762 operation['requesting-user-name'], ipp.RequestingUserName)[0] 763 self.printer.resume_printer() 764 735 765 736 766 @handler_for(ipp.OperationCodes.GET_PRINTER_ATTRIBUTES) … … 1405 1435 1406 1436 """ 1407 1437 1408 1438 raise ipp.errors.ServerErrorOperationNotSupported 1409 1439
Note: See TracChangeset
for help on using the changeset viewer.