Browse Source

fixed indentation for those strings

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1444 e5f2f494-b856-4b98-b285-d166d9295462
Jelte Jansen 15 years ago
parent
commit
505205989b
2 changed files with 21 additions and 20 deletions
  1. 1 0
      src/bin/bindctl/bindcmd.py
  2. 20 20
      src/bin/bindctl/moduleinfo.py

+ 1 - 0
src/bin/bindctl/bindcmd.py

@@ -342,6 +342,7 @@ class BindCmdInterpreter(Cmd):
                     if cmd.module == "config":
                         # grm text has been stripped of slashes...
                         my_text = self.location + "/" + cur_line.rpartition(" ")[2]
+                        print("[XX] completing config part")
                         list = self.config_data.get_config_item_list(my_text.rpartition("/")[0])
                         hints.extend([val for val in list if val.startswith(text)])
             except CmdModuleNameFormatError:

+ 20 - 20
src/bin/bindctl/moduleinfo.py

@@ -67,47 +67,47 @@ class CommandInfo:
         
 
     def add_param(self, paraminfo):
-    """Add a ParamInfo object to this CommandInfo"""
+        """Add a ParamInfo object to this CommandInfo"""
         self.params[paraminfo.name] = paraminfo
         
 
     def has_param_with_name(self, param_name):
-    """Returns true if the parameter with param_name exists"""
+        """Returns true if the parameter with param_name exists"""
         return param_name in self.params
         
 
     def get_param_with_name(self, param_name):
-    """Returns the ParamInfo with the given name. Raises a
-       KeyError if it doesn't exist"""
+        """Returns the ParamInfo with the given name. Raises a
+           KeyError if it doesn't exist"""
         return self.params[param_name]
         
 
     def get_params(self):
-    """Returns a list of all ParamInfo objects for this CommandInfo"""
+        """Returns a list of all ParamInfo objects for this CommandInfo"""
         return list(self.params.values())
         
 
     def get_param_names(self):
-    """Returns a list of the names of all parameters for this command"""
+        """Returns a list of the names of all parameters for this command"""
         return list(self.params.keys())
         
         
     def get_mandatory_param_names(self):
-    """Returns a list of the names of all mandatory parameters for
-       this command"""
+        """Returns a list of the names of all mandatory parameters for
+           this command"""
         all_names = self.params.keys()
         return [name for name in all_names 
                 if not self.params[name].is_optional]        
         
     def get_param_name_by_position(self, pos, param_count):
-        '''
+        """
         Find a proper parameter name for the position 'pos':
         If param_count is equal to the count of mandatory parameters of command,
         and there is some optional parameter, find the first mandatory parameter 
         from the position 'pos' to the end. Else, return the name on position pos.
         (This function will be changed if bindctl command line syntax is changed
         in the future. )
-        '''
+        """
         if type(pos) != int:
             raise KeyError(str(pos) + " is not an integer")
 
@@ -132,7 +132,7 @@ class CommandInfo:
 
 
     def command_help(self):
-    """Prints the help info for this command to stdout"""
+        """Prints the help info for this command to stdout"""
         print("Command ", self)
         print("\t\thelp (Get help for command)")
                 
@@ -174,34 +174,34 @@ class ModuleInfo:
         return str("%s \t%s" % (self.name, self.desc))
         
     def add_command(self, command_info):
-    """Add a CommandInfo to this ModuleInfo."""
+        """Add a CommandInfo to this ModuleInfo."""
         self.commands[command_info.name] = command_info
         
     def has_command_with_name(self, command_name):
-    """Returns true if this module has a command with the given name."""
+        """Returns true if this module has a command with the given name."""
         return command_name in self.commands
         
     def get_command_with_name(self, command_name):
-    """Returns the CommandInfo for the command with the given name.
-       Raises a KeyError if not found"""
+        """Returns the CommandInfo for the command with the given name.
+           Raises a KeyError if not found"""
         return self.commands[command_name]
         
     def get_commands(self):
-    """Returns a list of all CommandInfo objects for this module."""
+        """Returns a list of all CommandInfo objects for this module."""
         return list(self.commands.values())
         
     def get_command_names(self):
-    """Returns a list of the names of all commands for this module."""
+        """Returns a list of the names of all commands for this module."""
         return list(self.commands.keys())
 
     def module_help(self):
-    """Prints the help info for this module to stdout"""
+        """Prints the help info for this module to stdout"""
         print("Module ", self, "\nAvailable commands:")
         for k in self.commands.keys():
             print("\t", self.commands[k])
             
     def command_help(self, command):
-    """Prints the help info for the command with the given name.
-       Raises KeyError if not found"""
+        """Prints the help info for the command with the given name.
+           Raises KeyError if not found"""
         self.commands[command].command_help()