aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVMiklos <vmiklos@frugalware.org>2007-09-04 22:20:51 +0200
committerVMiklos <vmiklos@frugalware.org>2007-09-04 22:20:51 +0200
commitd86dfb15f27086bfb0052c89ca5b0e17388ff66b (patch)
treef3b70164adec8fb508a0ce8a08f1fceab5deb530
parent22d97b4de81e8f0785ff8c7675bd29de16bf6d01 (diff)
hide the ping/pong from the log, it's just spam
also set the ping timeout to 2sec, it does not cause a big cpu load but this way skyped is much more interactive
-rw-r--r--skype/skyped.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/skype/skyped.py b/skype/skyped.py
index d4af5bda..e9f2080e 100644
--- a/skype/skyped.py
+++ b/skype/skyped.py
@@ -51,9 +51,9 @@ def input_handler(fd, io_condition):
return True
def idle_handler(skype):
- skype.send("PING")
+ skype.skype._DoCommand("PING")
try:
- time.sleep(10)
+ time.sleep(2)
except KeyboardInterrupt:
sys.exit("Exiting.")
return True
@@ -89,6 +89,8 @@ class SkypeApi():
global conn
if mode != "rece_api":
return
+ if msg_text == "PONG":
+ return
if "\n" in msg_text:
# crappy skype prefixes only the first line for
# multiline messages so we need to do so for the other