Mercurial > pyntnclick
diff pyntnclick/main.py @ 691:60bf20849231 pyntnclick
Fix detail loading in rect_drawer. Improve error reporting when loading fails
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Tue, 14 Feb 2012 13:05:10 +0200 |
parents | f67bc162d69e |
children | d6ded808cc33 |
line wrap: on
line diff
--- a/pyntnclick/main.py Tue Feb 14 12:24:33 2012 +0200 +++ b/pyntnclick/main.py Tue Feb 14 13:05:10 2012 +0200 @@ -22,7 +22,8 @@ from pyntnclick.sound import Sound from pyntnclick import state -from pyntnclick.tools.rect_drawer import RectEngine, make_rect_display +from pyntnclick.tools.rect_drawer import (RectEngine, RectDrawerError, + make_rect_display) from pyntnclick.tools.utils import list_scenes @@ -148,10 +149,9 @@ make_rect_display() # FIXME: Remove Albow from here try: - self.engine = RectEngine(self, self.initial_state, opts.scene, - opts.detail) - except KeyError: - print 'Invalid scene: %s' % opts.scene + self.engine = RectEngine(self, opts.detail) + except RectDrawerError, e: + print 'RectDrawer failed with: %s' % e sys.exit(1) else: pygame.display.set_mode(self.constants.screen, SWSURFACE)