]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Disable the deprecation warning for the khashmir tests.
authorCameron Dale <camrdale@gmail.com>
Fri, 21 Dec 2007 03:52:43 +0000 (19:52 -0800)
committerCameron Dale <camrdale@gmail.com>
Fri, 21 Dec 2007 03:52:43 +0000 (19:52 -0800)
Need to rewrite the khashmir main functions to use Deferreds
or something.

apt_dht_Khashmir/khashmir.py
apt_dht_Khashmir/krpc.py

index b253c3859b09403ce5c9138296ba49ebe94dafca..bc6f835e5163017d268ebad9c48b77eee16c7e28 100644 (file)
@@ -1,6 +1,9 @@
 ## Copyright 2002-2004 Andrew Loewenstern, All Rights Reserved
 # see LICENSE.txt for license information
 
+import warnings
+warnings.simplefilter("ignore", DeprecationWarning)
+
 from time import time
 from random import randrange
 from sha import sha
@@ -362,6 +365,7 @@ class SimpleTests(unittest.TestCase):
                     'KE_AGE': 3600, }
 
     def setUp(self):
+        krpc.KRPC.noisy = 0
         d = self.DHT_DEFAULTS.copy()
         d['PORT'] = 4044
         self.a = Khashmir(d)
index 1458fc25903634bdf87400ef1db4cd584349016c..8910ac5033539aa5558be09166b0e47beeb38b32 100644 (file)
@@ -56,7 +56,7 @@ class hostbroker(protocol.DatagramProtocol):
 
 ## connection
 class KRPC:
-    noisy = 1
+    noisy = 0
     def __init__(self, addr, server, transport):
         self.transport = transport
         self.factory = server