Skip to content

Commit 420169f

Browse files
author
DUYN
committed
Add comments
1 parent c88eed1 commit 420169f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bot/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ def __call__(cls, *args, **kwargs):
1616

1717

1818
class StoppableThread(Thread):
19+
"""
20+
Class StoppableThread: Functions as a wrapper around a thread to add stop function
21+
"""
1922

2023
def __init__(self, *args, **keywords):
21-
threading.Thread.__init__(self, *args, **keywords)
24+
Thread.__init__(self, *args, **keywords)
2225
self.killed = False
2326

2427
def start(self):
2528
self.__run_backup = self.run
2629
self.run = self.__run
27-
threading.Thread.start(self)
30+
Thread.start(self)
2831

2932
def __run(self):
3033
sys.settrace(self.globaltrace)

0 commit comments

Comments
 (0)