diff options
author | VMiklos <vmiklos@frugalware.org> | 2007-09-04 22:20:51 +0200 |
---|---|---|
committer | VMiklos <vmiklos@frugalware.org> | 2007-09-04 22:20:51 +0200 |
commit | d86dfb15f27086bfb0052c89ca5b0e17388ff66b (patch) | |
tree | f3b70164adec8fb508a0ce8a08f1fceab5deb530 | |
parent | 22d97b4de81e8f0785ff8c7675bd29de16bf6d01 (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.py | 6 |
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 |