[tuxdroid-svn] r5400 - software_suite_v3/smart-core/smart-api/python/branches/user_mode/tuxisalive/
Status: Beta
Brought to you by:
ks156
|
From: gwadavel <c2m...@c2...> - 2009-09-15 14:16:23
|
Author: gwadavel
Date: 2009-09-15 15:55:58 +0200 (Tue, 15 Sep 2009)
New Revision: 5400
Modified:
software_suite_v3/smart-core/smart-api/python/branches/user_mode/tuxisalive/api/sh.py
Log:
test connexion with tux.server.connect()
Modified: software_suite_v3/smart-core/smart-api/python/branches/user_mode/tuxisalive/api/sh.py
===================================================================
--- software_suite_v3/smart-core/smart-api/python/branches/user_mode/tuxisalive/api/sh.py 2009-09-15 10:46:59 UTC (rev 5399)
+++ software_suite_v3/smart-core/smart-api/python/branches/user_mode/tuxisalive/api/sh.py 2009-09-15 13:55:58 UTC (rev 5400)
@@ -38,10 +38,12 @@
# Try to connect to the port 270
tux = TuxAPI("127.0.0.1", 270)
-time.sleep(1)
+time.sleep(0.5)
# If the API is not connected to the port 270, then try the port 54321 (user
# mode)
-if not tux.server.getConnected():
+if tux.server.connect(CLIENT_LEVEL_FREE, "TuxShell", "NoPasswd"):
+ tux.server.disconnect()
+else:
tux = TuxAPI("127.0.0.1", 54321)
verString = tux.getVersion()
|