napalm-automation / napalm-nxos

Apache License 2.0
9 stars 21 forks source link

Broken close method #72

Closed targuan closed 7 years ago

targuan commented 7 years ago

Description of Issue/Question

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

[X] Yes [ ] No

Setup

napalm-nxos version

napalm-nxos==0.5.0

NX-OS version

Not applicable

Steps to Reproduce the Issue

Make a change and call the close method.

Error Traceback

(Paste the complete traceback of the exception between quotes below)

Traceback (most recent call last):
  File "/home/adminlocal/.ansible/tmp/ansible-tmp-1486716066.17-143661846396122/debug_dir/ansible_module_napalm_install_config.py", line 266, in main
    device.close()
  File "/opt/venv/local/lib/python2.7/site-packages/napalm_nxos/nxos.py", line 87, in close
    self._delete_file(self.backup_file)
  File "/opt/venv/local/lib/python2.7/site-packages/napalm_nxos/nxos.py", line 319, in _delete_file
    self.device.show('terminal dont-ask', raw_text=True)
AttributeError: 'NoneType' object has no attribute 'show'