diff options
| author | VMiklos <vmiklos@frugalware.org> | 2007-10-06 17:25:21 +0200 | 
|---|---|---|
| committer | VMiklos <vmiklos@frugalware.org> | 2007-10-06 17:25:21 +0200 | 
| commit | 3922d44e2b9d4c970ed3697189fa63cdc9cbba6d (patch) | |
| tree | 6f9720e2f100968943aba3bdfce5c7bd04983868 | |
| parent | df9255d5cfe8e41220cabb664fe81c922db1f609 (diff) | |
handle the case when ping fails (ie: timeout)
| -rw-r--r-- | skype/skyped.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/skype/skyped.py b/skype/skyped.py index a79cd4fd..7e15b72f 100644 --- a/skype/skyped.py +++ b/skype/skyped.py @@ -51,7 +51,10 @@ def input_handler(fd, io_condition):  	return True  def idle_handler(skype): -	skype.skype.SendCommand(skype.skype.Command(-1, "PING")) +	try: +		skype.skype.SendCommand(skype.skype.Command(-1, "PING")) +	except Skype4Py.SkypeAPIError, s: +		dprint("Warning, pinging Skype failed (%s)." % (s))  	try:  		time.sleep(2)  	except KeyboardInterrupt: | 
