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()


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to