Show
Ignore:
Timestamp:
04/15/03 13:30:57 (21 years ago)
Author:
jalet
Message:

More work done on money print charging.
Minor bugs corrected.
All tools now access to the storage as priviledged users, repykota excepted.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/repykota

    r912 r915  
    2323# 
    2424# $Log$ 
     25# Revision 1.25  2003/04/15 11:30:57  jalet 
     26# More work done on money print charging. 
     27# Minor bugs corrected. 
     28# All tools now access to the storage as priviledged users, repykota excepted. 
     29# 
    2530# Revision 1.24  2003/04/14 20:05:20  jalet 
    2631# Reversed test. 
     
    156161class RePyKota(PyKotaTool) :         
    157162    """A class for repykota.""" 
     163    def __init__(self, doc) : 
     164        """Initializes the tool as a non-priviledged storage user.""" 
     165        PyKotaTool.__init__(self, asadmin=0, doc=doc) 
     166         
    158167    def main(self, options) : 
    159168        """Print Quota reports generator.""" 
     
    181190                print (" " * 43) + (_("Total : %9i") % total) 
    182191            printerpagecounter = self.storage.getPrinterPageCounter(printerid) 
    183             if printerpagecounter is None :     
     192            try : 
     193                msg = "%9i" % printerpagecounter["pagecounter"] 
     194            except TypeError :      
    184195                msg = _("unknown") 
    185             else : 
    186                 msg = "%9i" % printerpagecounter["pagecounter"] 
    187196            print (" " * 44) + (_("Real : %s") % msg) 
    188197            print