Changeset 2398

Show
Ignore:
Timestamp:
08/18/05 16:39:08 (19 years ago)
Author:
jerome
Message:

Fix for people who tell Samba to add the correct job-originating-host-name attribute
to the job ticket : we will always use the latest value seen if there's more than one.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r2396 r2398  
    209209         
    210210        try : 
    211             (chtype, clienthost) = ippmessage.operation_attributes.get("job-originating-host-name", \ 
    212                                       ippmessage.job_attributes.get("job-originating-host-name", (None, None))) 
     211            john = ippmessage.operation_attributes.get("job-originating-host-name", \ 
     212                   ippmessage.job_attributes.get("job-originating-host-name", (None, None))) 
     213            if type(john) == type([]) :                           
     214                john = john[-1] 
     215            (chtype, clienthost) = john                           
    213216            (jbtype, bcode) = ippmessage.job_attributes.get("job-billing", (None, None)) 
    214217        except AttributeError :