fixes issue with converting commands to an iterable was not being done

This fix will now force the commands arg in __call__ to be a list of
objects which otherwise would cause netcli not process the stack
This commit is contained in:
Peter Sprygada 2016-08-31 07:21:59 -04:00
parent 1c33b5a9f0
commit 1f9253c032

View file

@ -65,7 +65,7 @@ class Cli(object):
def __call__(self, commands, output=None): def __call__(self, commands, output=None):
objects = list() objects = list()
for cmd in commands: for cmd in to_list(commands):
objects.append(self.to_command(cmd, output)) objects.append(self.to_command(cmd, output))
return self.connection.run_commands(objects) return self.connection.run_commands(objects)