From f32345be4ef1c3b04f17251803768b363d8d1a7a Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Sat, 8 Dec 2007 20:00:03 -0800 Subject: [PATCH] Fix some errors found by PyLint. --- khashmir.py | 3 +-- knode.py | 4 ---- krpc.py | 1 - ktable.py | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/khashmir.py b/khashmir.py index 10bac3b..f585e16 100644 --- a/khashmir.py +++ b/khashmir.py @@ -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) diff --git a/knode.py b/knode.py index 46ab780..6e4f4e3 100644 --- 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 04dada2..b4dd6e4 100644 --- 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 diff --git a/ktable.py b/ktable.py index 67b23c9..b2cd6f3 100644 --- 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 -- 2.39.5