Fix AttributeError: 'NoneType' object has no attribute 'send'

Fix #1014
pull/1027/head
Julien Duponchelle 7 years ago
parent 930e7089db
commit bda36081a9
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -103,8 +103,8 @@ class Bridge(Device):
:param nio: NIO instance to remove
"""
yield from self._hypervisor.send('nio_bridge remove_nio "{name}" {nio}'.format(name=self._name, nio=nio))
if self._hypervisor:
yield from self._hypervisor.send('nio_bridge remove_nio "{name}" {nio}'.format(name=self._name, nio=nio))
self._nios.remove(nio)
@property

Loading…
Cancel
Save