comparison pyntnclick/main.py @ 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 a9e9a7fbdbcf
comparison
equal deleted inserted replaced
589:ebc48b397fd5 590:a77dd4619176
112 if self.constants.debug: 112 if self.constants.debug:
113 if opts.scene is not None: 113 if opts.scene is not None:
114 # debug the specified scene 114 # debug the specified scene
115 self._initial_scene = opts.scene 115 self._initial_scene = opts.scene
116 self._debug_rects = opts.rects 116 self._debug_rects = opts.rects
117 if opts.list_scenes: 117 if self.constants.debug and opts.list_scenes:
118 # FIXME: Horrible hack to avoid image loading issues for 118 # FIXME: Horrible hack to avoid image loading issues for
119 # now 119 # now
120 display = pygame.display.set_mode(self.constants.screen, 120 display = pygame.display.set_mode(self.constants.screen,
121 SWSURFACE) 121 SWSURFACE)
122 list_scenes(self.initial_state) 122 list_scenes(self.initial_state)
123 sys.exit(0) 123 sys.exit(0)
124 if opts.rect_drawer: 124 if self.constants.debug and opts.rect_drawer:
125 if opts.scene is None: 125 if opts.scene is None:
126 print 'Need to supply a scene to use the rect drawer' 126 print 'Need to supply a scene to use the rect drawer'
127 sys.exit(1) 127 sys.exit(1)
128 display = make_rect_display() 128 display = make_rect_display()
129 try: 129 try: