Changeset 2692 for pykota/trunk/bin/pykosd
- Timestamp:
- 02/14/06 16:18:45 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pykosd
r2622 r2692 112 112 while 1 : 113 113 color = savecolor 114 user = cmd.storage.getUserFromBackend(uname) # don't use cache114 user = self.storage.getUserFromBackend(uname) # don't use cache 115 115 if not user.Exists : 116 116 raise PyKotaCommandLineError, _("User %s doesn't exist in PyKota's database") % uname 117 117 if user.LimitBy == "quota" : 118 printers = cmd.storage.getMatchingPrinters("*")119 upquotas = [ cmd.storage.getUserPQuotaFromBackend(user, p) for p in printers ] # don't use cache118 printers = self.storage.getMatchingPrinters("*") 119 upquotas = [ self.storage.getUserPQuotaFromBackend(user, p) for p in printers ] # don't use cache 120 120 nblines = len(upquotas) 121 121 display = pyosd.osd(font=options["font"], colour=color, timeout=duration, shadow=2, lines=nblines) … … 131 131 display.display(_("Pages used on %s : %s") % (upq.Printer.Name, percent), type=pyosd.TYPE_STRING, line=line) 132 132 elif user.LimitBy == "balance" : 133 if user.AccountBalance <= 0:133 if user.AccountBalance <= self.config.getBalanceZero() : 134 134 color = "#FF0000" 135 135 display = pyosd.osd(font=options["font"], colour=color, timeout=duration, shadow=2)