Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pavel Zhukov
Kea
Commits
184c6c70
Commit
184c6c70
authored
Jan 31, 2011
by
Jelte Jansen
Browse files
[trac384] more review comments addressed
parent
7c7c7766
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/bin/bindctl/bindcmd.py
View file @
184c6c70
...
...
@@ -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
+=
"/"
...
...
src/bin/bindctl/moduleinfo.py
View file @
184c6c70
...
...
@@ -171,7 +171,7 @@ class CommandInfo:
print
(
textwrap
.
fill
(
info
.
get_desc
(),
initial_indent
=
" "
,
subsequent_indent
=
" "
,
width
=
5
0
))
width
=
7
0
))
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
=
5
0
))
width
=
7
0
))
class
ModuleInfo
:
...
...
src/lib/python/isc/config/ccsession.py
View file @
184c6c70
...
...
@@ -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
...
...
src/lib/python/isc/config/config_data.py
View file @
184c6c70
...
...
@@ -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
"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment