Author: remi
Date: 2009-03-12 19:33:36 +0100 (Thu, 12 Mar 2009)
New Revision: 4026
Modified:
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/TuxAPI.py
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/base/ApiBaseChild.py
Log:
* fixed access bug to uninitialized statuses
* fixed the versions report when the dongle is not connected
Modified:
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/TuxAPI.py
===================================================================
---
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/TuxAPI.py
2009-03-12 18:13:31 UTC (rev 4025)
+++
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/TuxAPI.py
2009-03-12 18:33:36 UTC (rev 4026)
@@ -114,9 +114,15 @@
verDict["tuxapi"] = __version__
verDict["tuxdroidserver"] = self.server.getVersion()
ver = self.server._requestOne(ST_NAME_DRIVER_SYMB_VER)
- verDict["tuxdriver"] = ver[ver.find("_") + 1:]
+ if ver == None:
+ verDict["tuxdriver"] = "Unknow"
+ else:
+ verDict["tuxdriver"] = ver[ver.find("_") + 1:]
ver = self.server._requestOne(ST_NAME_OSL_SYMB_VER)
- verDict["tuxosl"] = ver[ver.find("_") + 1:]
+ if ver == None:
+ verDict["tuxosl"] = "Unknow"
+ else:
+ verDict["tuxosl"] = ver[ver.find("_") + 1:]
return verDict
#
--------------------------------------------------------------------------
Modified:
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/base/ApiBaseChild.py
===================================================================
---
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/base/ApiBaseChild.py
2009-03-12 18:13:31 UTC (rev 4025)
+++
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/base/ApiBaseChild.py
2009-03-12 18:33:36 UTC (rev 4026)
@@ -172,4 +172,8 @@
if eventHandler == None:
return None
statusStruct = eventHandler.getLastState()
+ if statusStruct == None:
+ return None
+ if len(statusStruct) == 0:
+ return None
return statusStruct[0]
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn