Author: remi
Date: 2009-06-26 10:49:28 +0200 (Fri, 26 Jun 2009)
New Revision: 4904

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginParameter.py
Log:
* fixed parameters "enum" and "booleans" type parsing. (Now accept the () 
inside the enumerations)

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginParameter.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginParameter.py
    2009-06-25 18:42:56 UTC (rev 4903)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginParameter.py
    2009-06-26 08:49:28 UTC (rev 4904)
@@ -53,12 +53,16 @@
         self.__enumValuesList = []
         if self.__type.lower().find("enum") == 0:
             self.__type = "enum"
-            self.__enumValues = self.__dictionary['type'].split("(")[1][:-1]
+            idxb = self.__dictionary['type'].find("(") + 1
+            idxe = self.__dictionary['type'].rfind(")")
+            self.__enumValues = self.__dictionary['type'][idxb:idxe]
             for value in self.__enumValues.split(","):
                 self.__enumValuesList.append(value.strip())
         elif self.__type.lower().find("booleans") == 0:
             self.__type = "booleans"
-            self.__enumValues = self.__dictionary['type'].split("(")[1][:-1]
+            idxb = self.__dictionary['type'].find("(") + 1
+            idxe = self.__dictionary['type'].rfind(")")
+            self.__enumValues = self.__dictionary['type'][idxb:idxe]
             for value in self.__enumValues.split(","):
                 self.__enumValuesList.append(value.strip())
         else:


------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to