# HG changeset patch # User Stefano Rivera # Date 1378584612 -7200 # Node ID 943d93b47c7774d0716f35b7b2f8cdf02e00eaa8 # Parent 6710bc95a80c355542d4ca38de51673934b631ef Ignore the pymunk AssertionError on level change diff -r 6710bc95a80c -r 943d93b47c77 nagslang/screens/base.py --- a/nagslang/screens/base.py Sat Sep 07 22:03:48 2013 +0200 +++ b/nagslang/screens/base.py Sat Sep 07 22:10:12 2013 +0200 @@ -1,5 +1,7 @@ """A screen or area in which action happens.""" +import sys + from pygame import event import pymunk @@ -29,4 +31,11 @@ def tick(self, seconds): """Step the given amount of time.""" - self.space.step(seconds) + try: + self.space.step(seconds) + except AssertionError: + # TODO: Find the source of these + print >> sys.stderr, ( + 'Caught a pymunk assertion error. ' + "We don't know what causes these on level change. " + "Hopefully we can ignore them...")