changeset 590:a77dd4619176 pyntnclick

Fix to work when debug is not enabled
author Neil Muller <neil@dip.sun.ac.za>
date Sat, 11 Feb 2012 17:25:49 +0200
parents ebc48b397fd5
children 4117d7b201a4
files pyntnclick/main.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pyntnclick/main.py	Sat Feb 11 17:07:52 2012 +0200
+++ b/pyntnclick/main.py	Sat Feb 11 17:25:49 2012 +0200
@@ -114,14 +114,14 @@
                 # debug the specified scene
                 self._initial_scene = opts.scene
             self._debug_rects = opts.rects
-        if opts.list_scenes:
+        if self.constants.debug and opts.list_scenes:
             # FIXME: Horrible hack to avoid image loading issues for
             # now
             display = pygame.display.set_mode(self.constants.screen,
                                               SWSURFACE)
             list_scenes(self.initial_state)
             sys.exit(0)
-        if opts.rect_drawer:
+        if self.constants.debug and opts.rect_drawer:
             if opts.scene is None:
                 print 'Need to supply a scene to use the rect drawer'
                 sys.exit(1)