mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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
This commit is contained in:
@@ -60,7 +60,10 @@ class NxapiConfigMixin(object):
|
||||
self.execute(['no checkpoint %s' % checkpoint])
|
||||
|
||||
def save_config(self, **kwargs):
|
||||
self.execute(['copy running-config startup-config'])
|
||||
try:
|
||||
self.execute(['copy running-config startup-config'], output='text')
|
||||
except TypeError:
|
||||
self.execute(['copy running-config startup-config'])
|
||||
|
||||
def load_checkpoint(self, checkpoint):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user