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): ...@@ -601,8 +601,8 @@ class BindCmdInterpreter(Cmd):
line = value_map['name'] line = value_map['name']
if value_map['type'] in [ 'module', 'map' ]: if value_map['type'] in [ 'module', 'map' ]:
line += "/" line += "/"
elif len(value_map) > 1 and value_map['type'] == 'list' \ elif value_map['type'] == 'list' \
and (value_map['value'] != []): and value_map['value'] != []:
# do not print content of non-empty lists if # do not print content of non-empty lists if
# we have more data to show # we have more data to show
line += "/" line += "/"
......
...@@ -171,7 +171,7 @@ class CommandInfo: ...@@ -171,7 +171,7 @@ class CommandInfo:
print(textwrap.fill(info.get_desc(), print(textwrap.fill(info.get_desc(),
initial_indent=" ", initial_indent=" ",
subsequent_indent=" ", subsequent_indent=" ",
width=50)) width=70))
mandatory_infos.append(info) mandatory_infos.append(info)
optional_infos = [info for info in params.values() optional_infos = [info for info in params.values()
...@@ -183,7 +183,7 @@ class CommandInfo: ...@@ -183,7 +183,7 @@ class CommandInfo:
print(textwrap.fill(info.get_desc(), print(textwrap.fill(info.get_desc(),
initial_indent=" ", initial_indent=" ",
subsequent_indent=" ", subsequent_indent=" ",
width=50)) width=70))
class ModuleInfo: class ModuleInfo:
......
...@@ -401,8 +401,7 @@ class UIModuleCCSession(MultiConfigData): ...@@ -401,8 +401,7 @@ class UIModuleCCSession(MultiConfigData):
if value not in cur_list: if value not in cur_list:
cur_list.append(value) cur_list.append(value)
self.set_value(identifier, cur_list)
self.set_value(identifier, cur_list)
def remove_value(self, identifier, value_str): def remove_value(self, identifier, value_str):
"""Remove a value from a configuration list. The value string """Remove a value from a configuration list. The value string
......
...@@ -129,7 +129,7 @@ def find_spec_part(element, identifier): ...@@ -129,7 +129,7 @@ def find_spec_part(element, identifier):
cur_el = cur_el_item cur_el = cur_el_item
found = True found = True
if not found: 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(): elif type(cur_el) == dict and 'list_item_spec' in cur_el.keys():
cur_el = cur_el['list_item_spec'] cur_el = cur_el['list_item_spec']
elif type(cur_el) == list: elif type(cur_el) == list:
...@@ -146,7 +146,7 @@ def find_spec_part(element, identifier): ...@@ -146,7 +146,7 @@ def find_spec_part(element, identifier):
cur_el = cur_el["list_item_spec"] cur_el = cur_el["list_item_spec"]
found = True found = True
if not found: if not found:
raise isc.cc.data.DataNotFoundError(id + " in " + str(cur_el)) raise isc.cc.data.DataNotFoundError(id + " not found")
else: else:
raise isc.cc.data.DataNotFoundError("Not a correct config specification") raise isc.cc.data.DataNotFoundError("Not a correct config specification")
return cur_el return cur_el
...@@ -476,8 +476,10 @@ class MultiConfigData: ...@@ -476,8 +476,10 @@ class MultiConfigData:
name: name of the entry (string) name: name of the entry (string)
type: string containing the type of the value (or 'module') type: string containing the type of the value (or 'module')
value: value of the entry if it is a string, int, double or bool value: value of the entry if it is a string, int, double or bool
modified: true if the value is a local change modified: true if the value is a local change that has not
default: true if the value has been changed 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 TODO: use the consts for those last ones
Throws DataNotFoundError if the identifier is bad 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