]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Fix some errors found by PyLint.
authorCameron Dale <camrdale@gmail.com>
Sun, 9 Dec 2007 04:00:03 +0000 (20:00 -0800)
committerCameron Dale <camrdale@gmail.com>
Sun, 9 Dec 2007 04:00:03 +0000 (20:00 -0800)
khashmir.py
knode.py
krpc.py
ktable.py

index 10bac3bac0f5ebc89ffd54c5cfe51aec5ee48106..f585e16ad07fc1b717496f543cdd4e4b955a9f94 100644 (file)
@@ -31,7 +31,6 @@ class KhashmirDBExcept(Exception):
 
 # this is the base class, has base functionality and find node, no key-value mappings
 class KhashmirBase(protocol.Factory):
-    __slots__ = ('listener', 'node', 'table', 'store', 'app', 'last', 'protocol')
     _Node = KNodeBase
     def __init__(self, host, port, db='khashmir.db'):
         self.setup(host, port, db)
@@ -96,7 +95,7 @@ class KhashmirBase(protocol.Factory):
             #self.store.autocommit = 0
         except:
             import traceback
-            raise KhashmirDBExcept, "Couldn't open DB", traceback.exc_traceback
+            raise KhashmirDBExcept, "Couldn't open DB", traceback.format_exc()
         
     def _createNewDB(self, db):
         self.store = sqlite.connect(db=db)
index 46ab780f5cf6cebdf37c96860ce74f1f0d968b89..6e4f4e3ff7070410123e7bf2e09b53b9bc4de338 100644 (file)
--- a/knode.py
+++ b/knode.py
@@ -6,10 +6,6 @@ from twisted.internet.defer import Deferred
 from const import reactor, NULL_ID
 
 
-class IDChecker:
-    def __init__(id):
-        self.id = id
-
 class KNodeBase(Node):
     def checkSender(self, dict):
         try:
diff --git a/krpc.py b/krpc.py
index 04dada2c664f4ead0bb674d727ddf5ecdee547ed..b4dd6e48b7660cbd391fc034797604cc226aeb1c 100644 (file)
--- a/krpc.py
+++ b/krpc.py
@@ -75,7 +75,6 @@ class KRPC:
         except Exception, e:
             if self.noisy:
                 print "response decode error: " + `e`
-            self.d.errback()
         else:
             #if self.noisy:
             #    print msg
index 67b23c920ab09da45e2f823f754e03e9b7606ba9..b2cd6f3c677a07b06e7d07a582bdf3b6df591f72 100644 (file)
--- a/ktable.py
+++ b/ktable.py
@@ -170,7 +170,6 @@ class KTable:
                 self.invalidateNode(n)
                         
 class KBucket:
-    __slots__ = ('min', 'max', 'lastAccessed')
     def __init__(self, contents, min, max):
         self.l = contents
         self.min = min