Browse code

Specific handling for ModuleNotFoundError

haywalk authored on 02/12/2021 22:29:35
Showing 1 changed files

... ...
@@ -28,7 +28,7 @@ import random
28 28
 # Attempt to import Pygame
29 29
 try:
30 30
     import pygame
31
-except:
31
+except ModuleNotFoundError:
32 32
     print('This program requires the Pygame library to be installed.')
33 33
     quit()
34 34