Show
Ignore:
Timestamp:
04/04/06 11:40:56 (18 years ago)
Author:
jerome
Message:

Improved the code's quality a bit with pylint.

Location:
pykota/trunk/pykota/accounters
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/accounters/pjl.py

    r2637 r2830  
    202202    """Tries PJL accounting for a printer host.""" 
    203203    class fakeFilter : 
     204        """Fakes a filter for testing purposes.""" 
    204205        def __init__(self) : 
     206            """Initializes the fake filter.""" 
    205207            self.PrinterName = "FakePrintQueue" 
    206208            self.JobSizeBytes = 1 
    207209             
    208210        def printInfo(self, msg, level="info") : 
     211            """Prints informational message.""" 
    209212            sys.stderr.write("%s : %s\n" % (level.upper(), msg)) 
    210213            sys.stderr.flush() 
    211214             
    212215        def logdebug(self, msg) :     
     216            """Prints debug message.""" 
    213217            self.printInfo(msg, "debug") 
    214218             
    215219    class fakeAccounter :         
     220        """Fakes an accounter for testing purposes.""" 
    216221        def __init__(self) : 
     222            """Initializes fake accounter.""" 
    217223            self.arguments = "pjl:9100" 
    218224            self.filter = fakeFilter() 
     
    220226             
    221227        def getLastPageCounter(self) :     
     228            """Fakes the return of a page counter.""" 
    222229            return 0 
    223230         
  • pykota/trunk/pykota/accounters/snmp.py

    r2637 r2830  
    211211    """Tries SNMP accounting for a printer host.""" 
    212212    class fakeFilter : 
     213        """Fakes a filter for testing purposes.""" 
    213214        def __init__(self) : 
     215            """Initializes the fake filter.""" 
    214216            self.PrinterName = "FakePrintQueue" 
    215217            self.JobSizeBytes = 1 
    216218             
    217219        def printInfo(self, msg, level="info") : 
     220            """Prints informational message.""" 
    218221            sys.stderr.write("%s : %s\n" % (level.upper(), msg)) 
    219222            sys.stderr.flush() 
    220223             
    221224        def logdebug(self, msg) :     
     225            """Prints debug message.""" 
    222226            self.printInfo(msg, "debug") 
    223227             
    224228    class fakeAccounter :         
     229        """Fakes an accounter for testing purposes.""" 
    225230        def __init__(self) : 
     231            """Initializes fake accounter.""" 
    226232            self.arguments = "snmp:public" 
    227233            self.filter = fakeFilter() 
     
    229235             
    230236        def getLastPageCounter(self) :     
     237            """Fakes the return of a page counter.""" 
    231238            return 0 
    232239