Change sys.exit to pyglet.app.exit in Astraea game example.
@@ -42,7 +42,6 @@ Up: Thrusters
Space: Shoot
"""
-import sys
import math
import random
@@ -480,7 +479,7 @@ class MainMenu(Menu):
self.items.append(MenuItem('Instructions', 200,
begin_instructions_menu))
self.items.append(MenuItem('Options', 160, begin_options_menu))
- self.items.append(MenuItem('Quit', 120, sys.exit))
+ self.items.append(MenuItem('Quit', 120, pyglet.app.exit))
self.reset()
@@ -760,7 +759,7 @@ def on_key_press(symbol, modifiers):
resume_game()
return True
elif symbol == key.ESCAPE:
- sys.exit()
+ pyglet.app.exit()
return pyglet.event.EVENT_HANDLED
