Changing order of load and loadfp (#34793)
* Changing order of load and loadfp * Removing exception as per Ganesh Review comments
This commit is contained in:
parent
2c482847ce
commit
4e7e7042cc
1 changed files with 1 additions and 4 deletions
|
@ -183,10 +183,7 @@ def get_running_config(module):
|
||||||
def get_candidate(module):
|
def get_candidate(module):
|
||||||
candidate = NetworkConfig(indent=1)
|
candidate = NetworkConfig(indent=1)
|
||||||
if module.params['src']:
|
if module.params['src']:
|
||||||
try:
|
candidate.load(module.params['src'])
|
||||||
candidate.loadfp(module.params['src'])
|
|
||||||
except IOError:
|
|
||||||
candidate.load(module.params['src'])
|
|
||||||
elif module.params['lines']:
|
elif module.params['lines']:
|
||||||
parents = module.params['parents'] or list()
|
parents = module.params['parents'] or list()
|
||||||
candidate.add(module.params['lines'], parents=parents)
|
candidate.add(module.params['lines'], parents=parents)
|
||||||
|
|
Loading…
Reference in a new issue