Changeset 732 for pykota/trunk
- Timestamp:
- 02/07/03 01:08:52 (22 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/repykota
r731 r732 17 17 # 18 18 # $Log$ 19 # Revision 1.3 2003/02/07 00:08:52 jalet 20 # Typos 21 # 19 22 # Revision 1.2 2003/02/06 23:58:05 jalet 20 23 # repykota should be ok … … 91 94 if options["users"] : 92 95 print "User used soft hard grace" 93 print "------------------------------------------- "96 print "-----------------------------------------------------------" 94 97 for name in self.storage.getPrinterUsers(printer) : 95 98 quota = self.storage.getUserPQuota(name, printer) … … 97 100 else : 98 101 print "Group used soft hard grace" 99 print "------------------------------------------- "102 print "-----------------------------------------------------------" 100 103 for name in self.storage.getPrinterGroups(printer) : 101 104 quota = self.storage.getGroupPQuota(name, printer) -
pykota/trunk/pykota/storages/sql.py
r729 r732 15 15 # 16 16 # $Log$ 17 # Revision 1.13 2003/02/07 00:08:52 jalet 18 # Typos 19 # 17 20 # Revision 1.12 2003/02/06 23:20:03 jalet 18 21 # warnpykota doesn't need any user/group name argument, mimicing the … … 78 81 """Returns the list of usernames which uses a given printer.""" 79 82 result = self.doQuery("SELECT DISTINCT username FROM users WHERE id IN (SELECT userid FROM userpquota WHERE printerid IN (SELECT printerid FROM printers WHERE printername=%s));" % self.doQuote(printername)) 80 result = result.doParseResult(result)83 result = self.doParseResult(result) 81 84 if result is None : 82 85 return [] … … 87 90 """Returns the list of groups which uses a given printer.""" 88 91 result = self.doQuery("SELECT DISTINCT groupname FROM groups WHERE id IN (SELECT groupid FROM grouppquota WHERE printerid IN (SELECT printerid FROM printers WHERE printername=%s));" % self.doQuote(printername)) 89 result = result.doParseResult(result)92 result = self.doParseResult(result) 90 93 if result is None : 91 94 return []