Show
Ignore:
Timestamp:
06/25/03 16:10:01 (21 years ago)
Author:
jalet
Message:

Hey, it may work (edpykota --reset excepted) !

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pykota

    r1026 r1041  
    2323# 
    2424# $Log$ 
     25# Revision 1.35  2003/06/25 14:10:01  jalet 
     26# Hey, it may work (edpykota --reset excepted) ! 
     27# 
    2528# Revision 1.34  2003/06/13 18:54:17  jalet 
    2629# Bug with remote jobs and LPRng fixed. 
     
    239242     
    240243    # Get the last page counter and last username from the Quota Storage backend 
    241     printerid = kotafilter.storage.getPrinterId(kotafilter.printername) 
    242     if printerid is None : 
     244    printer = kotafilter.storage.getPrinter(kotafilter.printername) 
     245    if not printer.Exists : 
    243246        # The printer is unknown from the Quota Storage perspective 
    244247        # we let the job pass through, but log a warning message 
    245248        kotafilter.logger.log_message(_("Printer %s not registered in the PyKota system") % kotafilter.printername, "warn") 
    246249    else :     
    247         userid = kotafilter.storage.getUserId(kotafilter.username) 
    248         if userid is None : 
     250        user = kotafilter.storage.getUser(kotafilter.username) 
     251        if not user.Exists : 
    249252            # The user is unknown from the Quota Storage perspective 
    250253            # Depending on the default policy for this printer, we 
     
    261264        else : 
    262265            # Now does the accounting and act depending on the result 
    263             action = kotafilter.accounter.doAccounting(printerid, userid) 
     266            action = kotafilter.accounter.doAccounting(printer, user) 
    264267             
    265268            # if not allowed to print then die, else proceed.