Announcethread Pylint Fixes

This commit is contained in:
lakshyacis 2019-08-29 19:46:03 +05:30
parent 548fcf0d0a
commit 469d289a97
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -1,3 +1,7 @@
"""
src/network/announcethread.py
=================================
"""
import time import time
from bmconfigparser import BMConfigParser from bmconfigparser import BMConfigParser
@ -10,6 +14,7 @@ import state
class AnnounceThread(StoppableThread): class AnnounceThread(StoppableThread):
"""A thread to manage regular announcing of this node"""
def __init__(self): def __init__(self):
super(AnnounceThread, self).__init__(name="Announcer") super(AnnounceThread, self).__init__(name="Announcer")
logger.info("init announce thread") logger.info("init announce thread")
@ -24,7 +29,9 @@ class AnnounceThread(StoppableThread):
if processed == 0: if processed == 0:
self.stop.wait(10) self.stop.wait(10)
def announceSelf(self): @staticmethod
def announceSelf():
"""Announce our presence"""
for connection in BMConnectionPool().udpSockets.values(): for connection in BMConnectionPool().udpSockets.values():
if not connection.announcing: if not connection.announcing:
continue continue