Changeset 1743

Show
Ignore:
Timestamp:
09/24/04 23:19:48 (20 years ago)
Author:
jalet
Message:

Did a pass of PyChecker?

Location:
pykota/trunk/pykota
Files:
5 modified

Legend:

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

    r1739 r1743  
    2222# 
    2323# $Log$ 
     24# Revision 1.24  2004/09/24 21:19:48  jalet 
     25# Did a pass of PyChecker 
     26# 
    2427# Revision 1.23  2004/09/23 19:18:12  jalet 
    2528# Now loops when the external hardware accounter fails, until it returns a correct value 
     
    104107# 
    105108 
    106 import sys 
    107109import os 
    108110import time 
     
    152154            tsp.close() 
    153155     
    154         def handleAnswer(self, wholeMsg, transportAddr, req): 
     156        def handleAnswer(self, wholeMsg, notusedhere, req): 
    155157            """Decodes and handles the SNMP answer.""" 
    156158            ver = alpha.protoVersions[alpha.protoVersionId1] 
  • pykota/trunk/pykota/accounters/software.py

    r1687 r1743  
    2222# 
    2323# $Log$ 
     24# Revision 1.11  2004/09/24 21:19:48  jalet 
     25# Did a pass of PyChecker 
     26# 
    2427# Revision 1.10  2004/08/31 23:29:53  jalet 
    2528# Introduction of the new 'onaccountererror' configuration directive. 
     
    6467# 
    6568 
    66 import sys 
    6769import os 
    6870import popen2 
  • pykota/trunk/pykota/pdlanalyzer.py

    r1702 r1743  
    2222# 
    2323# $Log$ 
     24# Revision 1.42  2004/09/24 21:19:48  jalet 
     25# Did a pass of PyChecker 
     26# 
    2427# Revision 1.41  2004/09/04 14:18:55  jalet 
    2528# Support for more laserjet models added. 
     
    194197            child.tochild.close()     
    195198        except (IOError, OSError), msg :     
    196             raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document." 
     199            raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document : %s" % msg 
    197200             
    198201        pagecount = 0 
    199202        try : 
    200203            pagecount = int(child.fromchild.readline().strip()) 
    201         except (IOError, OSError, AttributeError, ValueError) : 
    202             raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document." 
     204        except (IOError, OSError, AttributeError, ValueError), msg : 
     205            raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document : %s" % msg 
    203206        child.fromchild.close() 
    204207         
    205208        try : 
    206             retcode = child.wait() 
     209            child.wait() 
    207210        except OSError, msg :     
    208             raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document." 
     211            raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document : %s" % msg 
    209212        return pagecount * self.copies 
    210213         
     
    335338                     # "*b" : "VW", # treated specially because it occurs very often 
    336339                   }   
    337         pagecount = resets = ejects = backsides = startgfx = endgfx = strangegfx = 0 
     340        pagecount = resets = ejects = backsides = startgfx = endgfx = 0 
    338341        starb = ispcl3 = 0 
    339342        tag = None 
  • pykota/trunk/pykota/storage.py

    r1742 r1743  
    2222# 
    2323# $Log$ 
     24# Revision 1.61  2004/09/24 21:19:48  jalet 
     25# Did a pass of PyChecker 
     26# 
    2427# Revision 1.60  2004/09/24 20:21:50  jalet 
    2528# Fixed pykotaAccountBalance object location during creation 
     
    547550    def getFromCache(self, cachetype, key) : 
    548551        """Tries to extract something from the cache.""" 
    549         entry = None    # just to please pychecker 
    550552        if self.usecache : 
    551553            entry = self.caches[cachetype].get(key) 
     
    554556            else :     
    555557                self.tool.logdebug("Cache miss (%s->%s)" % (cachetype, key)) 
    556         return entry     
     558            return entry     
    557559             
    558560    def cacheEntry(self, cachetype, key, value) :         
  • pykota/trunk/pykota/storages/dbistorage.py

    r1327 r1743  
    2222# 
    2323# $Log$ 
     24# Revision 1.2  2004/09/24 21:19:48  jalet 
     25# Did a pass of PyChecker 
     26# 
    2427# Revision 1.1  2004/02/02 22:44:15  jalet 
    2528# Preliminary work on Relationnal Database Independance via DB-API 2.0 
     
    4346 
    4447from pykota.storage import PyKotaStorageError,BaseStorage,StorageObject,StorageUser,StorageGroup,StoragePrinter,StorageJob,StorageLastJob,StorageUserPQuota,StorageGroupPQuota 
    45 from pykota.storages.sqlstorage import SQLStorage 
     48from pykota.storages.sql import SQLStorage 
    4649 
    4750try :