Changeset 915 for pykota/trunk/bin

Show
Ignore:
Timestamp:
04/15/03 13:30:57 (22 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.

Location:
pykota/trunk/bin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pykota

    r914 r915  
    2323# 
    2424# $Log$ 
     25# Revision 1.23  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.22  2003/04/15 11:09:04  jalet 
    2631# Small bug was fixed when a printer was never used and its internal 
     
    111116    """Class for the PyKota filter.""" 
    112117    def __init__(self, username) : 
    113         PyKotaTool.__init__(self, isfilter=1) 
     118        PyKotaTool.__init__(self) 
    114119        self.username = username 
    115120        self.requester = openRequester(self.config, self.printername) 
  • 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