changed from bsddb3 to pysqlite
[quix0rs-apt-p2p.git] / node.py
diff --git a/node.py b/node.py
index 1e1c0bd1f9ea19759b67f920703a6fb06cc27ef1..078ef3cc992c8b1bcfa44b7e8a52c9032b333aa5 100644 (file)
--- a/node.py
+++ b/node.py
@@ -16,12 +16,12 @@ class Node:
        self.int = hash.intify(id)
        self.host = host
        self.port = port
-       self._senderDict = {'id': Binary(self.id), 'port' : self.port, 'host' : self.host}
+       self._senderDict = {'id': self.id.encode('base64'), 'port' : self.port, 'host' : self.host}
        return self
        
     def initWithDict(self, dict):
        self._senderDict = dict
-       self.id = dict['id'].data
+       self.id = dict['id'].decode('base64')
        self.int = hash.intify(self.id)
        self.port = dict['port']
        self.host = dict['host']