Salome HOME
Fix the old remaining bug of the jobs command.
[tools/sat.git] / commands / base.py
index 9f1ac4fec1ed8b574be2c9c146d2f473cf53f3ea..6df87b8a055b645dfe439fbe3f10881adf79a5b0 100644 (file)
@@ -23,9 +23,18 @@ import src
 # Define all possible option for the shell command :  sat base <options>
 parser = src.options.Options()
 parser.add_option('s', 'set', 'string', 'base_path',
-    _('The path directory to use as base.'), None)
+    _('Optional: The path directory to use as base.'), None)
 
 def set_base(config, path, site_file_path, logger):
+    """ Edit the site.pyconf file and change the base path
+
+    :param config Config: The global configuration.    
+    :param path src.Path: The path to put in the site.pyconf file.
+    :param site_file_path Str: The path to the site.pyconf file.
+    :param logger Logger: The logger instance.
+    :return: 0 if all is OK, else 1
+    :rtype: int
+    """
     # Update the site.pyconf file
     try:
         site_pyconf_cfg = src.pyconf.Config(site_file_path)
@@ -46,6 +55,11 @@ def set_base(config, path, site_file_path, logger):
 
 
 def display_base_path(config, logger):
+    """ Display the base path
+
+    :param config Config: The global configuration.    
+    :param logger Logger: The logger instance.
+    """
     info = [(_("Base path"), config.SITE.base)]
     src.print_info(logger, info)
 
@@ -56,7 +70,7 @@ def description():
     :rtype: str
     '''
     return _("Display or set the base where to put installations of base "
-             "products")
+             "products\n\nexample\nsat base --set /tmp/BASE")
   
 def run(args, runner, logger):
     '''method that is called when salomeTools is called with base parameter.