Reindented all source code
This commit is contained in:
parent
17b9161813
commit
1aa7491624
@ -11,7 +11,7 @@ class client(client.client):
|
||||
""" This functions receives data from an enet server in the following protocol:
|
||||
dict(action="some_command", **kwargs)
|
||||
This function will send all data to whatever listener in the pubsub stack by using the topic "response".
|
||||
"""
|
||||
"""
|
||||
f = data.get("action")
|
||||
if f == None:
|
||||
print("Error: Invalid data in protocol. %r" % (data))
|
||||
@ -23,4 +23,3 @@ class client(client.client):
|
||||
|
||||
def disconnected(self, peer):
|
||||
pub.sendMessage("disconnected")
|
||||
|
||||
|
@ -17,12 +17,12 @@ def get_recording(filename):
|
||||
|
||||
class RepeatingTimer(threading.Thread):
|
||||
"""Call a function after a specified number of seconds, it will then repeat again after the specified number of seconds
|
||||
Note: If the function provided takes time to execute, this time is NOT taken from the next wait period
|
||||
Note: If the function provided takes time to execute, this time is NOT taken from the next wait period
|
||||
|
||||
t = RepeatingTimer(30.0, f, args=[], kwargs={})
|
||||
t.start()
|
||||
t.cancel() # stop the timer's actions
|
||||
"""
|
||||
t = RepeatingTimer(30.0, f, args=[], kwargs={})
|
||||
t.start()
|
||||
t.cancel() # stop the timer's actions
|
||||
"""
|
||||
|
||||
def __init__(self, interval, function, daemon=True, *args, **kwargs):
|
||||
threading.Thread.__init__(self)
|
||||
|
Loading…
Reference in New Issue
Block a user