root / pykota / trunk / pykota / storages / sql.py @ 1330

Revision 1330, 24.6 kB (checked in by jalet, 20 years ago)

pkprinters command line tool added.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# PyKota
2# -*- coding: ISO-8859-15 -*-
3#
4# PyKota : Print Quotas for CUPS and LPRng
5#
6# (c) 2003-2004 Jerome Alet <alet@librelogiciel.com>
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
20#
21# $Id$
22#
23# $Log$
24# Revision 1.35  2004/02/04 11:17:00  jalet
25# pkprinters command line tool added.
26#
27# Revision 1.34  2004/02/02 22:44:16  jalet
28# Preliminary work on Relationnal Database Independance via DB-API 2.0
29#
30#
31#
32
33from pykota.storage import PyKotaStorageError,BaseStorage,StorageObject,StorageUser,StorageGroup,StoragePrinter,StorageJob,StorageLastJob,StorageUserPQuota,StorageGroupPQuota
34
35class SQLStorage :
36    def getAllUsersNames(self) :   
37        """Extracts all user names."""
38        usernames = []
39        result = self.doSearch("SELECT username FROM users")
40        if result :
41            usernames = [record["username"] for record in result]
42        return usernames
43       
44    def getAllGroupsNames(self) :   
45        """Extracts all group names."""
46        groupnames = []
47        result = self.doSearch("SELECT groupname FROM groups")
48        if result :
49            groupnames = [record["groupname"] for record in result]
50        return groupnames
51       
52    def getUserFromBackend(self, username) :   
53        """Extracts user information given its name."""
54        user = StorageUser(self, username)
55        result = self.doSearch("SELECT * FROM users WHERE username=%s LIMIT 1" % self.doQuote(username))
56        if result :
57            fields = result[0]
58            user.ident = fields.get("id")
59            user.LimitBy = fields.get("limitby")
60            user.AccountBalance = fields.get("balance")
61            user.LifeTimePaid = fields.get("lifetimepaid")
62            user.Email = fields.get("email")
63            user.Exists = 1
64        return user
65       
66    def getGroupFromBackend(self, groupname) :   
67        """Extracts group information given its name."""
68        group = StorageGroup(self, groupname)
69        result = self.doSearch("SELECT * FROM groups WHERE groupname=%s LIMIT 1" % self.doQuote(groupname))
70        if result :
71            fields = result[0]
72            group.ident = fields.get("id")
73            group.LimitBy = fields.get("limitby")
74            result = self.doSearch("SELECT SUM(balance) AS balance, SUM(lifetimepaid) AS lifetimepaid FROM users WHERE id IN (SELECT userid FROM groupsmembers WHERE groupid=%s)" % self.doQuote(group.ident))
75            if result :
76                fields = result[0]
77                group.AccountBalance = fields.get("balance")
78                group.LifeTimePaid = fields.get("lifetimepaid")
79            group.Exists = 1
80        return group
81       
82    def getPrinterFromBackend(self, printername) :       
83        """Extracts printer information given its name."""
84        printer = StoragePrinter(self, printername)
85        result = self.doSearch("SELECT * FROM printers WHERE printername=%s LIMIT 1" % self.doQuote(printername))
86        if result :
87            fields = result[0]
88            printer.ident = fields.get("id")
89            printer.PricePerJob = fields.get("priceperjob")
90            printer.PricePerPage = fields.get("priceperpage")
91            printer.LastJob = self.getPrinterLastJob(printer)
92            printer.Exists = 1
93        return printer   
94       
95    def getUserPQuotaFromBackend(self, user, printer) :       
96        """Extracts a user print quota."""
97        userpquota = StorageUserPQuota(self, user, printer)
98        if printer.Exists and user.Exists :
99            result = self.doSearch("SELECT id, lifepagecounter, pagecounter, softlimit, hardlimit, datelimit FROM userpquota WHERE userid=%s AND printerid=%s" % (self.doQuote(user.ident), self.doQuote(printer.ident)))
100            if result :
101                fields = result[0]
102                userpquota.ident = fields.get("id")
103                userpquota.PageCounter = fields.get("pagecounter")
104                userpquota.LifePageCounter = fields.get("lifepagecounter")
105                userpquota.SoftLimit = fields.get("softlimit")
106                userpquota.HardLimit = fields.get("hardlimit")
107                userpquota.DateLimit = fields.get("datelimit")
108                userpquota.Exists = 1
109        return userpquota
110       
111    def getGroupPQuotaFromBackend(self, group, printer) :       
112        """Extracts a group print quota."""
113        grouppquota = StorageGroupPQuota(self, group, printer)
114        if group.Exists :
115            result = self.doSearch("SELECT id, softlimit, hardlimit, datelimit FROM grouppquota WHERE groupid=%s AND printerid=%s" % (self.doQuote(group.ident), self.doQuote(printer.ident)))
116            if result :
117                fields = result[0]
118                grouppquota.ident = fields.get("id")
119                grouppquota.SoftLimit = fields.get("softlimit")
120                grouppquota.HardLimit = fields.get("hardlimit")
121                grouppquota.DateLimit = fields.get("datelimit")
122                result = self.doSearch("SELECT SUM(lifepagecounter) AS lifepagecounter, SUM(pagecounter) AS pagecounter FROM userpquota WHERE printerid=%s AND userid IN (SELECT userid FROM groupsmembers WHERE groupid=%s)" % (self.doQuote(printer.ident), self.doQuote(group.ident)))
123                if result :
124                    fields = result[0]
125                    grouppquota.PageCounter = fields.get("pagecounter")
126                    grouppquota.LifePageCounter = fields.get("lifepagecounter")
127                grouppquota.Exists = 1
128        return grouppquota
129       
130    def getPrinterLastJobFromBackend(self, printer) :       
131        """Extracts a printer's last job information."""
132        lastjob = StorageLastJob(self, printer)
133        result = self.doSearch("SELECT jobhistory.id, jobid, userid, username, pagecounter, jobsize, jobprice, filename, title, copies, options, jobdate FROM jobhistory, users WHERE printerid=%s AND userid=users.id ORDER BY jobdate DESC LIMIT 1" % self.doQuote(printer.ident))
134        if result :
135            fields = result[0]
136            lastjob.ident = fields.get("id")
137            lastjob.JobId = fields.get("jobid")
138            lastjob.User = self.getUser(fields.get("username"))
139            lastjob.PrinterPageCounter = fields.get("pagecounter")
140            lastjob.JobSize = fields.get("jobsize")
141            lastjob.JobPrice = fields.get("jobprice")
142            lastjob.JobAction = fields.get("action")
143            lastjob.JobFileName = fields.get("filename")
144            lastjob.JobTitle = fields.get("title")
145            lastjob.JobCopies = fields.get("copies")
146            lastjob.JobOptions = fields.get("options")
147            lastjob.JobDate = fields.get("jobdate")
148            lastjob.Exists = 1
149        return lastjob
150           
151    def getGroupMembersFromBackend(self, group) :       
152        """Returns the group's members list."""
153        groupmembers = []
154        result = self.doSearch("SELECT * FROM groupsmembers JOIN users ON groupsmembers.userid=users.id WHERE groupid=%s" % self.doQuote(group.ident))
155        if result :
156            for record in result :
157                user = StorageUser(self, record.get("username"))
158                user.ident = record.get("userid")
159                user.LimitBy = record.get("limitby")
160                user.AccountBalance = record.get("balance")
161                user.LifeTimePaid = record.get("lifetimepaid")
162                user.Email = record.get("email")
163                user.Exists = 1
164                groupmembers.append(user)
165                self.cacheEntry("USERS", user.Name, user)
166        return groupmembers       
167       
168    def getUserGroupsFromBackend(self, user) :       
169        """Returns the user's groups list."""
170        groups = []
171        result = self.doSearch("SELECT groupname FROM groupsmembers JOIN groups ON groupsmembers.groupid=groups.id WHERE userid=%s" % self.doQuote(user.ident))
172        if result :
173            for record in result :
174                groups.append(self.getGroup(record.get("groupname")))
175        return groups       
176       
177    def getParentPrintersFromBackend(self, printer) :   
178        """Get all the printer groups this printer is a member of."""
179        pgroups = []
180        result = self.doSearch("SELECT groupid,printername FROM printergroupsmembers JOIN printers ON groupid=id WHERE printerid=%s" % self.doQuote(printer.ident))
181        if result :
182            for record in result :
183                if record["groupid"] != printer.ident : # in case of integrity violation
184                    parentprinter = self.getPrinter(record.get("printername"))
185                    if parentprinter.Exists :
186                        pgroups.append(parentprinter)
187        return pgroups
188       
189    def getMatchingPrinters(self, printerpattern) :
190        """Returns the list of all printers for which name matches a certain pattern."""
191        printers = []
192        # We 'could' do a SELECT printername FROM printers WHERE printername LIKE ...
193        # but we don't because other storages semantics may be different, so every
194        # storage should use fnmatch to match patterns and be storage agnostic
195        result = self.doSearch("SELECT * FROM printers")
196        if result :
197            for record in result :
198                if self.tool.matchString(record["printername"], printerpattern.split(",")) :
199                    printer = StoragePrinter(self, record["printername"])
200                    printer.ident = record.get("id")
201                    printer.PricePerJob = record.get("priceperjob")
202                    printer.PricePerPage = record.get("priceperpage")
203                    printer.LastJob = self.getPrinterLastJob(printer)
204                    printer.Exists = 1
205                    printers.append(printer)
206                    self.cacheEntry("PRINTERS", printer.Name, printer)
207        return printers       
208       
209    def getPrinterUsersAndQuotas(self, printer, names=["*"]) :       
210        """Returns the list of users who uses a given printer, along with their quotas."""
211        usersandquotas = []
212        result = self.doSearch("SELECT users.id as uid,username,balance,lifetimepaid,limitby,email,userpquota.id,lifepagecounter,pagecounter,softlimit,hardlimit,datelimit FROM users JOIN userpquota ON users.id=userpquota.userid AND printerid=%s ORDER BY username ASC" % self.doQuote(printer.ident))
213        if result :
214            for record in result :
215                if self.tool.matchString(record.get("username"), names) :
216                    user = StorageUser(self, record.get("username"))
217                    user.ident = record.get("uid")
218                    user.LimitBy = record.get("limitby")
219                    user.AccountBalance = record.get("balance")
220                    user.LifeTimePaid = record.get("lifetimepaid")
221                    user.Email = record.get("email") 
222                    user.Exists = 1
223                    userpquota = StorageUserPQuota(self, user, printer)
224                    userpquota.ident = record.get("id")
225                    userpquota.PageCounter = record.get("pagecounter")
226                    userpquota.LifePageCounter = record.get("lifepagecounter")
227                    userpquota.SoftLimit = record.get("softlimit")
228                    userpquota.HardLimit = record.get("hardlimit")
229                    userpquota.DateLimit = record.get("datelimit")
230                    userpquota.Exists = 1
231                    usersandquotas.append((user, userpquota))
232                    self.cacheEntry("USERS", user.Name, user)
233                    self.cacheEntry("USERPQUOTAS", "%s@%s" % (user.Name, printer.Name), userpquota)
234        return usersandquotas
235               
236    def getPrinterGroupsAndQuotas(self, printer, names=["*"]) :       
237        """Returns the list of groups which uses a given printer, along with their quotas."""
238        groupsandquotas = []
239        result = self.doSearch("SELECT groupname FROM groups JOIN grouppquota ON groups.id=grouppquota.groupid AND printerid=%s ORDER BY groupname ASC" % self.doQuote(printer.ident))
240        if result :
241            for record in result :
242                if self.tool.matchString(record.get("groupname"), names) :
243                    group = self.getGroup(record.get("groupname"))
244                    grouppquota = self.getGroupPQuota(group, printer)
245                    groupsandquotas.append((group, grouppquota))
246        return groupsandquotas
247       
248    def addPrinter(self, printername) :       
249        """Adds a printer to the quota storage, returns it."""
250        self.doModify("INSERT INTO printers (printername) VALUES (%s)" % self.doQuote(printername))
251        return self.getPrinter(printername)
252       
253    def addUser(self, user) :       
254        """Adds a user to the quota storage, returns its id."""
255        self.doModify("INSERT INTO users (username, limitby, balance, lifetimepaid, email) VALUES (%s, %s, %s, %s, %s)" % (self.doQuote(user.Name), self.doQuote(user.LimitBy), self.doQuote(user.AccountBalance), self.doQuote(user.LifeTimePaid), self.doQuote(user.Email)))
256        return self.getUser(user.Name)
257       
258    def addGroup(self, group) :       
259        """Adds a group to the quota storage, returns its id."""
260        self.doModify("INSERT INTO groups (groupname, limitby) VALUES (%s, %s)" % (self.doQuote(group.Name), self.doQuote(group.LimitBy)))
261        return self.getGroup(group.Name)
262
263    def addUserToGroup(self, user, group) :   
264        """Adds an user to a group."""
265        result = self.doSearch("SELECT COUNT(*) AS mexists FROM groupsmembers WHERE groupid=%s AND userid=%s" % (self.doQuote(group.ident), self.doQuote(user.ident)))
266        try :
267            mexists = int(result[0].get("mexists"))
268        except (IndexError, TypeError) :   
269            mexists = 0
270        if not mexists :   
271            self.doModify("INSERT INTO groupsmembers (groupid, userid) VALUES (%s, %s)" % (self.doQuote(group.ident), self.doQuote(user.ident)))
272           
273    def addUserPQuota(self, user, printer) :
274        """Initializes a user print quota on a printer."""
275        self.doModify("INSERT INTO userpquota (userid, printerid) VALUES (%s, %s)" % (self.doQuote(user.ident), self.doQuote(printer.ident)))
276        return self.getUserPQuota(user, printer)
277       
278    def addGroupPQuota(self, group, printer) :
279        """Initializes a group print quota on a printer."""
280        self.doModify("INSERT INTO grouppquota (groupid, printerid) VALUES (%s, %s)" % (self.doQuote(group.ident), self.doQuote(printer.ident)))
281        return self.getGroupPQuota(group, printer)
282       
283    def writePrinterPrices(self, printer) :   
284        """Write the printer's prices back into the storage."""
285        self.doModify("UPDATE printers SET priceperpage=%s, priceperjob=%s WHERE id=%s" % (self.doQuote(printer.PricePerPage), self.doQuote(printer.PricePerJob), self.doQuote(printer.ident)))
286       
287    def writeUserLimitBy(self, user, limitby) :   
288        """Sets the user's limiting factor."""
289        self.doModify("UPDATE users SET limitby=%s WHERE id=%s" % (self.doQuote(limitby), self.doQuote(user.ident)))
290       
291    def writeGroupLimitBy(self, group, limitby) :   
292        """Sets the group's limiting factor."""
293        self.doModify("UPDATE groups SET limitby=%s WHERE id=%s" % (self.doQuote(limitby), self.doQuote(group.ident)))
294       
295    def writeUserPQuotaDateLimit(self, userpquota, datelimit) :   
296        """Sets the date limit permanently for a user print quota."""
297        self.doModify("UPDATE userpquota SET datelimit=%s WHERE id=%s" % (self.doQuote(datelimit), self.doQuote(userpquota.ident)))
298           
299    def writeGroupPQuotaDateLimit(self, grouppquota, datelimit) :   
300        """Sets the date limit permanently for a group print quota."""
301        self.doModify("UPDATE grouppquota SET datelimit=%s WHERE id=%s" % (self.doQuote(datelimit), self.doQuote(grouppquota.ident)))
302       
303    def increaseUserPQuotaPagesCounters(self, userpquota, nbpages) :   
304        """Increase page counters for a user print quota."""
305        self.doModify("UPDATE userpquota SET pagecounter=pagecounter+%s,lifepagecounter=lifepagecounter+%s WHERE id=%s" % (self.doQuote(nbpages), self.doQuote(nbpages), self.doQuote(userpquota.ident)))
306       
307    def writeUserPQuotaPagesCounters(self, userpquota, newpagecounter, newlifepagecounter) :   
308        """Sets the new page counters permanently for a user print quota."""
309        self.doModify("UPDATE userpquota SET pagecounter=%s,lifepagecounter=%s WHERE id=%s" % (self.doQuote(newpagecounter), self.doQuote(newlifepagecounter), self.doQuote(userpquota.ident)))
310       
311    def decreaseUserAccountBalance(self, user, amount) :   
312        """Decreases user's account balance from an amount."""
313        self.doModify("UPDATE users SET balance=balance-%s WHERE id=%s" % (self.doQuote(amount), self.doQuote(user.ident)))
314       
315    def writeUserAccountBalance(self, user, newbalance, newlifetimepaid=None) :   
316        """Sets the new account balance and eventually new lifetime paid."""
317        if newlifetimepaid is not None :
318            self.doModify("UPDATE users SET balance=%s, lifetimepaid=%s WHERE id=%s" % (self.doQuote(newbalance), self.doQuote(newlifetimepaid), self.doQuote(user.ident)))
319        else :   
320            self.doModify("UPDATE users SET balance=%s WHERE id=%s" % (self.doQuote(newbalance), self.doQuote(user.ident)))
321           
322    def writeLastJobSize(self, lastjob, jobsize, jobprice) :       
323        """Sets the last job's size permanently."""
324        self.doModify("UPDATE jobhistory SET jobsize=%s, jobprice=%s WHERE id=%s" % (self.doQuote(jobsize), self.doQuote(jobprice), self.doQuote(lastjob.ident)))
325       
326    def writeJobNew(self, printer, user, jobid, pagecounter, action, jobsize=None, jobprice=None, filename=None, title=None, copies=None, options=None) :   
327        """Adds a job in a printer's history."""
328        if (not self.disablehistory) or (not printer.LastJob.Exists) :
329            if jobsize is not None :
330                self.doModify("INSERT INTO jobhistory (userid, printerid, jobid, pagecounter, action, jobsize, jobprice, filename, title, copies, options) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)" % (self.doQuote(user.ident), self.doQuote(printer.ident), self.doQuote(jobid), self.doQuote(pagecounter), self.doQuote(action), self.doQuote(jobsize), self.doQuote(jobprice), self.doQuote(filename), self.doQuote(title), self.doQuote(copies), self.doQuote(options)))
331            else :   
332                self.doModify("INSERT INTO jobhistory (userid, printerid, jobid, pagecounter, action, filename, title, copies, options) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)" % (self.doQuote(user.ident), self.doQuote(printer.ident), self.doQuote(jobid), self.doQuote(pagecounter), self.doQuote(action), self.doQuote(filename), self.doQuote(title), self.doQuote(copies), self.doQuote(options)))
333        else :       
334            # here we explicitly want to reset jobsize to NULL if needed
335            self.doModify("UPDATE jobhistory SET userid=%s, jobid=%s, pagecounter=%s, action=%s, jobsize=%s, jobprice=%s, filename=%s, title=%s, copies=%s, options=%s, jobdate=now() WHERE id=%s" % (self.doQuote(user.ident), self.doQuote(jobid), self.doQuote(pagecounter), self.doQuote(action), self.doQuote(jobsize), self.doQuote(jobprice), self.doQuote(filename), self.doQuote(title), self.doQuote(copies), self.doQuote(options), self.doQuote(printer.LastJob.ident)))
336           
337    def writeUserPQuotaLimits(self, userpquota, softlimit, hardlimit) :
338        """Sets soft and hard limits for a user quota."""
339        self.doModify("UPDATE userpquota SET softlimit=%s, hardlimit=%s, datelimit=NULL WHERE id=%s" % (self.doQuote(softlimit), self.doQuote(hardlimit), self.doQuote(userpquota.ident)))
340       
341    def writeGroupPQuotaLimits(self, grouppquota, softlimit, hardlimit) :
342        """Sets soft and hard limits for a group quota on a specific printer."""
343        self.doModify("UPDATE grouppquota SET softlimit=%s, hardlimit=%s, datelimit=NULL WHERE id=%s" % (self.doQuote(softlimit), self.doQuote(hardlimit), self.doQuote(grouppquota.ident)))
344
345    def writePrinterToGroup(self, pgroup, printer) :
346        """Puts a printer into a printer group."""
347        children = []
348        result = self.doSearch("SELECT printerid FROM printergroupsmembers WHERE groupid=%s" % self.doQuote(pgroup.ident))
349        if result :
350            for record in result :
351                children.append(record.get("printerid")) # TODO : put this into the database integrity rules
352        if printer.ident not in children :       
353            self.doModify("INSERT INTO printergroupsmembers (groupid, printerid) VALUES (%s, %s)" % (self.doQuote(pgroup.ident), self.doQuote(printer.ident)))
354       
355    def retrieveHistory(self, user=None, printer=None, datelimit=None, limit=100) :   
356        """Retrieves all print jobs for user on printer (or all) before date, limited to first 100 results."""
357        query = "SELECT jobhistory.*,username,printername FROM jobhistory,users,printers WHERE users.id=userid AND printers.id=printerid"
358        where = []
359        if (user is not None) and user.Exists :
360            where.append("userid=%s" % self.doQuote(user.ident))
361        if (printer is not None) and printer.Exists :
362            where.append("printerid=%s" % self.doQuote(printer.ident))
363        if datelimit is not None :   
364            where.append("jobdate<=%s" % self.doQuote(datelimit))
365        if where :   
366            query += " AND %s" % " AND ".join(where)
367        query += " ORDER BY id DESC"
368        if limit :
369            query += " LIMIT %s" % self.doQuote(int(limit))
370        jobs = []   
371        result = self.doSearch(query)   
372        if result :
373            for fields in result :
374                job = StorageJob(self)
375                job.ident = fields.get("id")
376                job.JobId = fields.get("jobid")
377                job.PrinterPageCounter = fields.get("pagecounter")
378                job.JobSize = fields.get("jobsize")
379                job.JobPrice = fields.get("jobprice")
380                job.JobAction = fields.get("action")
381                job.JobFileName = fields.get("filename")
382                job.JobTitle = fields.get("title")
383                job.JobCopies = fields.get("copies")
384                job.JobOptions = fields.get("options")
385                job.JobDate = fields.get("jobdate")
386                job.User = self.getUser(fields.get("username"))
387                job.Printer = self.getPrinter(fields.get("printername"))
388                job.Exists = 1
389                jobs.append(job)
390        return jobs
391       
392    def deleteUser(self, user) :   
393        """Completely deletes an user from the Quota Storage."""
394        # TODO : What should we do if we delete the last person who used a given printer ?
395        # TODO : we can't reassign the last job to the previous one, because next user would be
396        # TODO : incorrectly charged (overcharged).
397        for q in [ 
398                    "DELETE FROM groupsmembers WHERE userid=%s" % self.doQuote(user.ident),
399                    "DELETE FROM jobhistory WHERE userid=%s" % self.doQuote(user.ident),
400                    "DELETE FROM userpquota WHERE userid=%s" % self.doQuote(user.ident),
401                    "DELETE FROM users WHERE id=%s" % self.doQuote(user.ident),
402                  ] :
403            self.doModify(q)
404       
405    def deleteGroup(self, group) :   
406        """Completely deletes a group from the Quota Storage."""
407        for q in [
408                   "DELETE FROM groupsmembers WHERE groupid=%s" % self.doQuote(group.ident),
409                   "DELETE FROM grouppquota WHERE groupid=%s" % self.doQuote(group.ident),
410                   "DELETE FROM groups WHERE id=%s" % self.doQuote(group.ident),
411                 ] : 
412            self.doModify(q)
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       
Note: See TracBrowser for help on using the browser.