Show
Ignore:
Timestamp:
02/04/04 12:17:00 (20 years ago)
Author:
jalet
Message:

pkprinters command line tool added.

Files:
1 modified

Legend:

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

    r1327 r1330  
    2222# 
    2323# $Log$ 
     24# Revision 1.35  2004/02/04 11:17:00  jalet 
     25# pkprinters command line tool added. 
     26# 
    2427# Revision 1.34  2004/02/02 22:44:16  jalet 
    2528# Preliminary work on Relationnal Database Independance via DB-API 2.0 
     
    408411                 ] :   
    409412            self.doModify(q) 
    410          
     413             
     414    def deletePrinter(self, printer) :     
     415        """Completely deletes a printer from the Quota Storage.""" 
     416        for q in [  
     417                    "DELETE FROM printergroupsmembers WHERE groupid=%s OR printerid=%s" % (self.doQuote(printer.ident), self.doQuote(printer.ident)), 
     418                    "DELETE FROM jobhistory WHERE printerid=%s" % self.doQuote(printer.ident), 
     419                    "DELETE FROM grouppquota WHERE printerid=%s" % self.doQuote(printer.ident), 
     420                    "DELETE FROM userpquota WHERE printerid=%s" % self.doQuote(printer.ident), 
     421                    "DELETE FROM printers WHERE id=%s" % self.doQuote(printer.ident), 
     422                  ] : 
     423            self.doModify(q) 
     424