Changing order of load and loadfp (#34793)

* Changing order of load and loadfp

* Removing exception as per Ganesh Review comments
pull/24568/merge
Anil Kumar Muraleedharan 7 years ago committed by Ganesh Nalawade
parent 2c482847ce
commit 4e7e7042cc

@ -183,10 +183,7 @@ def get_running_config(module):
def get_candidate(module):
candidate = NetworkConfig(indent=1)
if module.params['src']:
try:
candidate.loadfp(module.params['src'])
except IOError:
candidate.load(module.params['src'])
candidate.load(module.params['src'])
elif module.params['lines']:
parents = module.params['parents'] or list()
candidate.add(module.params['lines'], parents=parents)

Loading…
Cancel
Save