From: Cameron Dale Date: Sun, 9 Dec 2007 04:00:03 +0000 (-0800) Subject: Fix some errors found by PyLint. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f32345be4ef1c3b04f17251803768b363d8d1a7a;p=quix0rs-apt-p2p.git Fix some errors found by PyLint. --- 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