Salome HOME
bug fix: sat generate
[tools/sat.git] / src / options.py
index a6bca2a1944bd49bd227109c8a9204d2b21d918d..2cfeae0ae84246bbe33a8ffa966b5db2fbe801b3 100644 (file)
@@ -72,9 +72,10 @@ class Options:
         # The list of available option type
         self.availableOptions = ["boolean", "string", "int", "float",
                                   "long", "list", "list2"]
+        self.default = None
 
     def add_option(self, shortName, longName,
-                    optionType, destName, helpString=""):
+                    optionType, destName, helpString="", default = None):
         '''Method to add an option to a command. It gets all attributes
            of an option and append it in the options field
         
@@ -100,7 +101,7 @@ class Options:
         option['optionType'] = optionType
         option['destName'] = destName
         option['helpString'] = helpString
-        option['result'] = None
+        option['result'] = default
         self.options.append(option)
 
     def print_help(self):