fixes issue when calling save_config() and transport is nxapi (#17835)

An unhandled exeception is raised with using nxapi transport and setting
the save argument to true.  This fix will allow the configuration to be
saved regardless of the transport.

fixes ansible/ansible-modules-core#5094
pull/17842/head
Peter Sprygada 8 years ago committed by GitHub
parent d88025f0cb
commit 9faf56a345

@ -60,6 +60,9 @@ class NxapiConfigMixin(object):
self.execute(['no checkpoint %s' % checkpoint])
def save_config(self, **kwargs):
try:
self.execute(['copy running-config startup-config'], output='text')
except TypeError:
self.execute(['copy running-config startup-config'])
def load_checkpoint(self, checkpoint):

Loading…
Cancel
Save