__init__.py edited online with Bitbucket
Changed the Window.__del__ method to always pass silently if resources are already released. This avoids other errors that might appear if running pyglet in the REPL.
@@ -585,7 +585,7 @@ class BaseWindow(with_metaclass(_WindowMetaclass, EventDispatcher)):
# If the window is already closed, pass silently.
try:
self.close()
- except TypeError: # XXX Avoid a NoneType error if already closed.
+ except: # XXX Avoid a NoneType error if already closed.
pass
def __repr__(self):
