Show
Ignore:
Timestamp:
02/14/06 16:18:45 (18 years ago)
Author:
jerome
Message:

Added the 'duplicatesdelay' and 'balancezero' directives.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r2657 r2692  
    458458            if enforcement == "STRICT" :  
    459459                val -= self.softwareJobPrice # use precomputed size. 
    460             if val <= 0.0 : 
     460            balancezero = self.config.getBalanceZero() 
     461            if val <= balancezero : 
    461462                action = "DENY" 
    462463            elif val <= self.config.getPoorMan() :     
     
    464465            else :     
    465466                action = "ALLOW" 
    466             if (enforcement == "STRICT") and (val == 0.0) : 
     467            if (enforcement == "STRICT") and (val == balancezero) : 
    467468                action = "WARN" # we can still print until account is 0 
    468469        else : 
     
    549550                    if enforcement == "STRICT" :  
    550551                        val -= self.softwareJobPrice # use precomputed size. 
    551                     if val <= 0.0 : 
     552                    balancezero = self.config.getBalanceZero()     
     553                    if val <= balancezero : 
    552554                        action = "DENY" 
    553555                    elif val <= self.config.getPoorMan() :     
     
    555557                    else : 
    556558                        action = "ALLOW" 
    557                     if (enforcement == "STRICT") and (val == 0.0) : 
     559                    if (enforcement == "STRICT") and (val == balancezero) : 
    558560                        action = "WARN" # we can still print until account is 0 
    559561                return action