Show
Ignore:
Timestamp:
02/07/03 23:13:13 (21 years ago)
Author:
jalet
Message:

Perhaps edpykota is now able to add printers !!! Oh, stupid me !

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/sql.py

    r732 r748  
    1515# 
    1616# $Log$ 
     17# Revision 1.14  2003/02/07 22:13:13  jalet 
     18# Perhaps edpykota is now able to add printers !!! Oh, stupid me ! 
     19# 
    1720# Revision 1.13  2003/02/07 00:08:52  jalet 
    1821# Typos 
     
    7881        return printerslist         
    7982             
     83    def addPrinter(self, printername) :         
     84        """Adds a printer to the quota storage.""" 
     85        self.doQuery("INSERT INTO printers (printername) VALUES (%s);" % self.doQuote(printername)) 
     86         
    8087    def getPrinterUsers(self, printername) :         
    8188        """Returns the list of usernames which uses a given printer.""" 
     
    127134        (userid, printerid) = self.getUPIds(username, printername) 
    128135        if printerid is None :     
    129             self.doQuery("INSERT INTO printers (printername) VALUES (%s);" % self.doQuote(printername)) 
     136            self.addPrinter(printername)        # should we still add it ? 
    130137        if userid is None :     
    131138            self.doQuery("INSERT INTO users (username) VALUES (%s);" % self.doQuote(username))