Show
Ignore:
Timestamp:
05/05/05 23:52:49 (20 years ago)
Author:
jerome
Message:

Improved stability in pykotme and pykotme.cgi
Now uses real userid instead of effective userid in pykotme and pykosd,
to allow user root to check his own account instead of user pykota's one
(since we drop priviledges early).
Better setup instructions for pykotme.cgi

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/pykotme.cgi

    r2229 r2232  
    145145                try :     
    146146                    user = self.storage.getUser(remuser) 
    147                     for printer in printers : 
    148                         upquota = self.storage.getUserPQuota(user, printer) 
    149                         cost = upquota.computeJobPrice(jobsize) 
    150                         self.body += "<p>%s</p>" % (_("Cost on printer %s : %.2f") % (printer.Name, cost)) 
     147                    if user.Exists : 
     148                        for printer in printers : 
     149                            upquota = self.storage.getUserPQuota(user, printer) 
     150                            if upquota.Exists : 
     151                                cost = upquota.computeJobPrice(jobsize) 
     152                                self.body += "<p>%s</p>" % (_("Cost on printer %s : %.2f") % (printer.Name, cost)) 
    151153                except : 
    152154                    self.body += '<p><font color="red">%s</font></p>' % self.crashed("CGI Error").replace("\n", "<br />")