Added iteritems issues

This commit is contained in:
jai.s 2019-11-15 20:12:19 +05:30
parent a08b0707bb
commit 0e593b66ad
No known key found for this signature in database
GPG Key ID: 360CFA25EFC67D12

View File

@ -105,11 +105,10 @@ 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({
for k, v in {
k: v for k, v in iter([hasmap for hasmap in self.hashMap.items()])
if v.child is None
}).items():
}.items():
self.hashMap[k] = Stem(
connection, v.stream, self.poissonTimeout())
invQueue.put((v.stream, k, v.child))
@ -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())