Commit 184c6c70 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[trac384] more review comments addressed

parent 7c7c7766
......@@ -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 += "/"
......
......@@ -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:
......
......@@ -401,7 +401,6 @@ class UIModuleCCSession(MultiConfigData):
if value not in cur_list:
cur_list.append(value)
self.set_value(identifier, cur_list)
def remove_value(self, identifier, value_str):
......
......@@ -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
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment