Changeset 1878

Show
Ignore:
Timestamp:
10/25/04 19:05:36 (20 years ago)
Author:
jalet
Message:

Another fix for LPRng support debug messages : I'm sure I'm completely stupid now.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/lprngpykota

    r1877 r1878  
    2424# 
    2525# $Log$ 
     26# Revision 1.12  2004/10/25 17:05:36  jalet 
     27# Another fix for LPRng support debug messages : I'm sure I'm completely stupid now. 
     28# 
    2629# Revision 1.11  2004/10/25 15:14:59  jalet 
    2730# Fixed typo in code added to debug LPRng problem 
     
    107110        """First pass done here.""" 
    108111        # first we have to check if previous job was correctly accounted for 
    109         self.logdebug("First pass begins : POLICY_%s => %s => %s" % (policy, getattr(printer, "Name"), getattr(user, "Name"))) 
     112        self.logdebug("First pass begins : POLICY_%s => %s => %s" % (policy, getattr(printer, "Name", None), getattr(user, "Name", None))) 
    110113        if printer.LastJob.Exists and not printer.LastJob.JobSize : 
    111114            # here we know that previous job wasn't accounted for correctly 
     
    190193            self.logdebug("Job added to history during first pass : Job's size and price are still unknown.") 
    191194             
    192         self.logdebug("First pass ends : ACTION_%s => %s => %s" % (action, getattr(printer, "Name"), getattr(user, "Name"))) 
     195        self.logdebug("First pass ends : ACTION_%s => %s => %s" % (action, getattr(printer, "Name", None), getattr(user, "Name", None))) 
    193196        if action == "DENY" : 
    194197            return self.removeJob() 
     
    200203        # Last job for current printer has the same JobId than 
    201204        # the current job, so we know we are in the second pass 
    202         self.logdebug("Second pass begins : POLICY_%s => %s => %s" % (policy, getattr(printer, "Name"), getattr(user, "Name"))) 
     205        self.logdebug("Second pass begins : POLICY_%s => %s => %s" % (policy, getattr(printer, "Name", None), getattr(user, "Name", None))) 
    203206        if self.accounter.isSoftware : 
    204207            # Software accounting method was used, and we are 
     
    256259             
    257260            # here hardware accounting was completed. 
    258         self.logdebug("Second pass ends : POLICY_%s => %s => %s" % (policy, getattr(printer, "Name"), getattr(user, "Name"))) 
     261        self.logdebug("Second pass ends : POLICY_%s => %s => %s" % (policy, getattr(printer, "Name", None), getattr(user, "Name", None))) 
    259262        return self.acceptJob() 
    260263