Changeset 1743
- Timestamp:
- 09/24/04 23:19:48 (20 years ago)
- Location:
- pykota/trunk/pykota
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/hardware.py
r1739 r1743 22 22 # 23 23 # $Log$ 24 # Revision 1.24 2004/09/24 21:19:48 jalet 25 # Did a pass of PyChecker 26 # 24 27 # Revision 1.23 2004/09/23 19:18:12 jalet 25 28 # Now loops when the external hardware accounter fails, until it returns a correct value … … 104 107 # 105 108 106 import sys107 109 import os 108 110 import time … … 152 154 tsp.close() 153 155 154 def handleAnswer(self, wholeMsg, transportAddr, req):156 def handleAnswer(self, wholeMsg, notusedhere, req): 155 157 """Decodes and handles the SNMP answer.""" 156 158 ver = alpha.protoVersions[alpha.protoVersionId1] -
pykota/trunk/pykota/accounters/software.py
r1687 r1743 22 22 # 23 23 # $Log$ 24 # Revision 1.11 2004/09/24 21:19:48 jalet 25 # Did a pass of PyChecker 26 # 24 27 # Revision 1.10 2004/08/31 23:29:53 jalet 25 28 # Introduction of the new 'onaccountererror' configuration directive. … … 64 67 # 65 68 66 import sys67 69 import os 68 70 import popen2 -
pykota/trunk/pykota/pdlanalyzer.py
r1702 r1743 22 22 # 23 23 # $Log$ 24 # Revision 1.42 2004/09/24 21:19:48 jalet 25 # Did a pass of PyChecker 26 # 24 27 # Revision 1.41 2004/09/04 14:18:55 jalet 25 28 # Support for more laserjet models added. … … 194 197 child.tochild.close() 195 198 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 197 200 198 201 pagecount = 0 199 202 try : 200 203 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 203 206 child.fromchild.close() 204 207 205 208 try : 206 retcode =child.wait()209 child.wait() 207 210 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 209 212 return pagecount * self.copies 210 213 … … 335 338 # "*b" : "VW", # treated specially because it occurs very often 336 339 } 337 pagecount = resets = ejects = backsides = startgfx = endgfx = strangegfx =0340 pagecount = resets = ejects = backsides = startgfx = endgfx = 0 338 341 starb = ispcl3 = 0 339 342 tag = None -
pykota/trunk/pykota/storage.py
r1742 r1743 22 22 # 23 23 # $Log$ 24 # Revision 1.61 2004/09/24 21:19:48 jalet 25 # Did a pass of PyChecker 26 # 24 27 # Revision 1.60 2004/09/24 20:21:50 jalet 25 28 # Fixed pykotaAccountBalance object location during creation … … 547 550 def getFromCache(self, cachetype, key) : 548 551 """Tries to extract something from the cache.""" 549 entry = None # just to please pychecker550 552 if self.usecache : 551 553 entry = self.caches[cachetype].get(key) … … 554 556 else : 555 557 self.tool.logdebug("Cache miss (%s->%s)" % (cachetype, key)) 556 return entry558 return entry 557 559 558 560 def cacheEntry(self, cachetype, key, value) : -
pykota/trunk/pykota/storages/dbistorage.py
r1327 r1743 22 22 # 23 23 # $Log$ 24 # Revision 1.2 2004/09/24 21:19:48 jalet 25 # Did a pass of PyChecker 26 # 24 27 # Revision 1.1 2004/02/02 22:44:15 jalet 25 28 # Preliminary work on Relationnal Database Independance via DB-API 2.0 … … 43 46 44 47 from pykota.storage import PyKotaStorageError,BaseStorage,StorageObject,StorageUser,StorageGroup,StoragePrinter,StorageJob,StorageLastJob,StorageUserPQuota,StorageGroupPQuota 45 from pykota.storages.sql storageimport SQLStorage48 from pykota.storages.sql import SQLStorage 46 49 47 50 try :