Changeset 6c60b2e
- Timestamp:
- Jan 21, 2012, 6:25:33 PM (12 years ago)
- Branches:
- no-cups
- Children:
- 0494098, 079ef11
- Parents:
- 7f1098c
- git-author:
- Daniel Cooper <danny@…> (01/21/12 18:25:33)
- git-committer:
- Daniel Cooper <danny@…> (01/21/12 18:25:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/gutenbach/server/requests.py
rf70792f r6c60b2e 125 125 @handler_for(ipp.OperationCodes.PRINT_JOB) 126 126 def print_job(self, request, response): 127 """RFC 2911: 3.2.1 Print-Job Operation127 """RFC 2911: 3.2.1 Print-Job Operation 128 128 129 129 This REQUIRED operation allows a client to submit a print job … … 199 199 # get attributes from the printer and add to response 200 200 job_id = self.printer.create_job( 201 requesting_user_name= requesting_user_name,201 requesting_user_name=user_name, 202 202 job_name=job_name, 203 203 job_k_octets=job_k_octets) … … 208 208 # Get nescessary information for calling send_document 209 209 # Any field being set to None here just means that we either aren't using or haven't implemented parsing it 210 document = request. attribute_groups[2]210 document = request.data 211 211 #XXX 212 212 document_format = None … … 218 218 219 219 # Actually put the document in the job 220 self.printer.send_document(job_id,document, 220 try: 221 self.printer.send_document(job_id,document, 222 document_name = document_name, 223 document_format = document_format, 224 document_natural_language = document_natural_language, 225 requesting_user_name = requesting_user_name, 226 compression = compression, 227 last_document = last_document) 228 except InvalidJobException: 229 raise ipp.errors.ClientErrorNotFound("bad job: %d" % job_id) 230 231 232 # Print the job, now that we've filled it in as appropriate 233 234 #XXX 235 #Should we be handling a possible exception here? 236 self.print_job(document, 221 237 document_name = document_name, 222 238 document_format = document_format, 223 239 document_natural_language = document_natural_language, 224 240 requesting_user_name = requesting_user_name, 225 compression = compression, 226 last_document = last_document) 227 #fix this once jess pushes 228 self.print_job() 241 compression=compression, 242 job_name = job_name, 243 job_k_octets = job_k_octets) 244 245 attrs = self.printer.get_job_attributes(job_id) 246 response.attribute_groups.append(ipp.AttributeGroup(ipp.AttributeTags.JOB, attrs)) 247 229 248 @handler_for(ipp.OperationCodes.VALIDATE_JOB) 230 249 def validate_job(self, request, response):
Note: See TracChangeset
for help on using the changeset viewer.