Added check on widget close to make sure comm isn't already none.

This commit is contained in:
Jonathan Frederic 2013-11-12 13:47:43 -08:00 committed by Jonathan Frederic
parent 8daa879087
commit 742ad511f6

View File

@ -98,8 +98,11 @@ class Widget(LoggingConfigurable):
"""Close method. Closes the widget which closes the underlying comm.
When the comm is closed, all of the widget views are automatically
removed from the frontend."""
self._comm.close()
del self._comm
try:
self._comm.close()
del self._comm
except:
pass # Comm doesn't exist and/or is already closed.
# Properties