[PATCH 3/8] Fix get_command_syntax bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It was returning the same value for multiple default params (since index
was not being incremented).

Signed-off-by: Andy Grover <agrover@xxxxxxxxxx>
---
 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]))
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux