fixes minor issue in get_block_config() (#20544)
passed an invalid argument to dumps() to return the config block
This commit is contained in:
parent
61e6e7868c
commit
8495b6323a
1 changed files with 1 additions and 3 deletions
|
@ -108,8 +108,6 @@ def _obj_to_block(objects, visited=None):
|
||||||
def dumps(objects, output='block', comments=False):
|
def dumps(objects, output='block', comments=False):
|
||||||
if output == 'block':
|
if output == 'block':
|
||||||
items = _obj_to_block(objects)
|
items = _obj_to_block(objects)
|
||||||
#elif output == 'block':
|
|
||||||
# items = _obj_to_raw(objects)
|
|
||||||
elif output == 'commands':
|
elif output == 'commands':
|
||||||
items = _obj_to_text(objects)
|
items = _obj_to_text(objects)
|
||||||
else:
|
else:
|
||||||
|
@ -226,7 +224,7 @@ class NetworkConfig(object):
|
||||||
|
|
||||||
def get_block_config(self, path):
|
def get_block_config(self, path):
|
||||||
block = self.get_block(path)
|
block = self.get_block(path)
|
||||||
return dumps(block, 'config')
|
return dumps(block, 'block')
|
||||||
|
|
||||||
def _expand_block(self, configobj, S=None):
|
def _expand_block(self, configobj, S=None):
|
||||||
if S is None:
|
if S is None:
|
||||||
|
|
Loading…
Reference in a new issue