Changeset 1696 for pykota/trunk/bin

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

Another bunch of LPRng fixes

Files:
1 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__" :