diff options
author | Andy Grover <agrover@redhat.com> | 2011-12-02 11:24:12 -0800 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2011-12-05 14:07:06 -0800 |
commit | 6f27881bf4baa1b1016e4427fa073077abe0ebce (patch) | |
tree | 899ad15ad73d0680fb782eb52e352f8ad8543e02 /configshell | |
parent | 06580a71029244d243bc4f9709d7d7353fce16e3 (diff) | |
download | configshell-fb-6f27881bf4baa1b1016e4427fa073077abe0ebce.tar.gz |
Fix get_command_syntax bug
It was returning the same value for multiple default params (since index
was not being incremented).
Signed-off-by: Andy Grover <agrover@redhat.com>
Diffstat (limited to 'configshell')
-rw-r--r-- | configshell/node.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/configshell/node.py b/configshell/node.py index 282800f..8afdc41 100644 --- a/configshell/node.py +++ b/configshell/node.py @@ -1636,8 +1636,7 @@ class ConfigNode(object): default_values = '' if num_defaults > 0: - index = 0 - for param in optional_parameters: + for index, param in enumerate(optional_parameters): if default[index] is not None: default_values += "%s=%s " % (param, str(default[index])) |