Browse Source

[trac384] more review comments addressed

Jelte Jansen 14 years ago
parent
commit
184c6c7068

+ 2 - 2
src/bin/bindctl/bindcmd.py

@@ -601,8 +601,8 @@ class BindCmdInterpreter(Cmd):
                 line = value_map['name']
                 if value_map['type'] in [ 'module', 'map' ]:
                     line += "/"
-                elif len(value_map) > 1 and value_map['type'] == 'list' \
-                     and (value_map['value'] != []):
+                elif value_map['type'] == 'list' \
+                     and value_map['value'] != []:
                     # do not print content of non-empty lists if
                     # we have more data to show
                     line += "/"

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

@@ -171,7 +171,7 @@ class CommandInfo:
                 print(textwrap.fill(info.get_desc(),
                       initial_indent="        ",
                       subsequent_indent="        ",
-                      width=50))
+                      width=70))
                 mandatory_infos.append(info)
 
         optional_infos = [info for info in params.values() 
@@ -183,7 +183,7 @@ class CommandInfo:
                 print(textwrap.fill(info.get_desc(),
                       initial_indent="        ",
                       subsequent_indent="        ",
-                      width=50))
+                      width=70))
 
 
 class ModuleInfo:

+ 1 - 2
src/lib/python/isc/config/ccsession.py

@@ -401,8 +401,7 @@ class UIModuleCCSession(MultiConfigData):
             
         if value not in cur_list:
             cur_list.append(value)
-
-        self.set_value(identifier, cur_list)
+            self.set_value(identifier, cur_list)
 
     def remove_value(self, identifier, value_str):
         """Remove a value from a configuration list. The value string

+ 6 - 4
src/lib/python/isc/config/config_data.py

@@ -129,7 +129,7 @@ def find_spec_part(element, identifier):
                     cur_el = cur_el_item
                     found = True
             if not found:
-                raise isc.cc.data.DataNotFoundError(id + " in " + str(cur_el))
+                raise isc.cc.data.DataNotFoundError(id + " not found")
         elif type(cur_el) == dict and 'list_item_spec' in cur_el.keys():
             cur_el = cur_el['list_item_spec']
         elif type(cur_el) == list:
@@ -146,7 +146,7 @@ def find_spec_part(element, identifier):
                             cur_el = cur_el["list_item_spec"]
                     found = True
             if not found:
-                raise isc.cc.data.DataNotFoundError(id + " in " + str(cur_el))
+                raise isc.cc.data.DataNotFoundError(id + " not found")
         else:
             raise isc.cc.data.DataNotFoundError("Not a correct config specification")
     return cur_el
@@ -476,8 +476,10 @@ class MultiConfigData:
            name: name of the entry (string)
            type: string containing the type of the value (or 'module')
            value: value of the entry if it is a string, int, double or bool
-           modified: true if the value is a local change
-           default: true if the value has been changed
+           modified: true if the value is a local change that has not
+                     been committed
+           default: true if the value has not been changed (i.e. the
+                    value is the default from the specification)
            TODO: use the consts for those last ones
            Throws DataNotFoundError if the identifier is bad
         """