Author: remi
Date: 2009-06-22 14:33:12 +0200 (Mon, 22 Jun 2009)
New Revision: 4850

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
Log:
* fixed a bug with the default value of the radio state
* fixed a bug with empty gadgets data structure

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
  2009-06-22 12:31:57 UTC (rev 4849)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
  2009-06-22 12:33:12 UTC (rev 4850)
@@ -30,7 +30,7 @@
                 dongleState = "off"
         state = 
eventsHandler.getEventHandler(ST_NAME_RADIO_STATE).getLastState()
         if state == None:
-            radioState = False
+            radioState = "off"
         else:
             if state[0]:
                 radioState = "on"
@@ -161,7 +161,9 @@
         contentStruct = self.getDefaultContentStruct()
         contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
         contentStruct['root']['data'] = resourceWIUser01.getStates()
-        contentStruct['root']['gadgets'] = 
resourceRobotContentInteractions.getPguContextsManager().getOnDemandDictForThumbnailBar()
+        gadgetsData = 
resourceRobotContentInteractions.getPguContextsManager().getOnDemandDictForThumbnailBar()
+        if gadgetsData != {}:
+            contentStruct['root']['gadgets'] = gadgetsData
         return headersStruct, contentStruct
 
 # Register the service into the resource


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to