Added iteritems issues
This commit is contained in:
parent
a08b0707bb
commit
0e593b66ad
|
@ -105,14 +105,13 @@ class Dandelion(): # pylint: disable=old-style-class
|
|||
#hashMap is has any value
|
||||
# if not [hasmap for hasmap in self.hashMap.items()] ==[]:
|
||||
try:
|
||||
if self.hashMap:
|
||||
for k, v in iter({
|
||||
k: v for k, v in iter([hasmap for hasmap in self.hashMap.items()])
|
||||
if v.child is None
|
||||
}).items():
|
||||
self.hashMap[k] = Stem(
|
||||
connection, v.stream, self.poissonTimeout())
|
||||
invQueue.put((v.stream, k, v.child))
|
||||
for k, v in {
|
||||
k: v for k, v in iter([hasmap for hasmap in self.hashMap.items()])
|
||||
if v.child is None
|
||||
}.items():
|
||||
self.hashMap[k] = Stem(
|
||||
connection, v.stream, self.poissonTimeout())
|
||||
invQueue.put((v.stream, k, v.child))
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
@ -139,10 +138,10 @@ class Dandelion(): # pylint: disable=old-style-class
|
|||
k for k, v in iter(self.nodeMap.items()) if v == connection
|
||||
):
|
||||
self.nodeMap[k] = None
|
||||
for k, v in iter({
|
||||
for k, v in {
|
||||
k: v for k, v in iter(iter([hasmap for hasmap in self.hashMap.items()]))
|
||||
if v.child == connection
|
||||
}).items():
|
||||
}.items():
|
||||
self.hashMap[k] = Stem(
|
||||
None, v.stream, self.poissonTimeout())
|
||||
|
||||
|
|
Reference in New Issue
Block a user