Merge pull request #613 from jphdotam/fix_referenceerror

Prevent ReferenceErrors on cleanup
This commit is contained in:
Luke Campagnola 2017-12-19 21:58:22 -08:00 committed by GitHub
commit 6b06922da2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -320,7 +320,7 @@ def cleanup():
'are properly called before app shutdown (%s)\n' % (o,))
s.addItem(o)
except RuntimeError: ## occurs if a python wrapper no longer has its underlying C++ object
except (RuntimeError, ReferenceError): ## occurs if a python wrapper no longer has its underlying C++ object
continue
_cleanupCalled = True