Changeset 1696

Show
Ignore:
Timestamp:
09/02/04 16:40:13 (20 years ago)
Author:
jalet
Message:

Another bunch of LPRng fixes

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/lprngpykota

    r1629 r1696  
    2424# 
    2525# $Log$ 
     26# Revision 1.6  2004/09/02 14:40:13  jalet 
     27# Another bunch of LPRng fixes 
     28# 
    2629# Revision 1.5  2004/07/23 11:19:48  jalet 
    2730# 1.19beta is out ! 
     
    8083            return [line[11:] for line in os.environ.get("HF", "").split() if line.startswith("remotehost=")][0] 
    8184        except IndexError :     
    82             return None 
     85            try : 
     86                return [line[1:] for line in os.environ.get("CONTROL", "").split() if line.startswith("H")][0] 
     87            except IndexError :     
     88                return None 
    8389                 
    8490    def firstPass(self, policy, printer, user, userpquota) :             
     
    244250            return self.acceptJob() 
    245251        else :     
    246             if (not printer.LastJob.Exists) or (printer.LastJob.JobId != self.jobid) : 
     252            if printer.LastJob.Exists and (printer.LastJob.JobId == self.jobid) : 
     253                # here we know we are in second pass. 
     254                return self.secondPass(policy, printer, user, userpquota) 
     255            else :     
    247256                # Last job for current printer has a different JobId than 
    248257                # the current job, so we know we are in the first pass. 
    249258                return self.firstPass(policy, printer, user, userpquota) 
    250             else :     
    251                 # and here we know we are in second pass. 
    252                 return self.secondPass(policy, printer, user, userpquota) 
    253259             
    254260if __name__ == "__main__" :     
  • pykota/trunk/NEWS

    r1695 r1696  
    2424    - 1.20alpha6 : 
    2525       
    26         - Small fix for old versions of LPRng. 
     26        - Small fixes for LPRng. 
    2727         
    2828        - Now exports PYKOTAPRINTERHOSTNAME for network printers'