comparison pytouhou/menu.py @ 570:f0252cf111d8

Don’t traceback when GTK+ isn’t available.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 10 Jul 2014 13:53:46 +0200
parents e7a4731a278b
children 7f113f15300b
comparison
equal deleted inserted replaced
569:b21922a03830 570:f0252cf111d8
13 ## 13 ##
14 14
15 from pytouhou.utils.helpers import get_logger 15 from pytouhou.utils.helpers import get_logger
16 logger = get_logger(__name__) 16 logger = get_logger(__name__)
17 17
18 try: 18 from gi.repository import Gtk, Gdk
19 from gi.repository import Gtk, Gdk
20 except ImportError:
21 logger.error('GTK+ unavailable, disabling the GUI menu.')
22 raise
23 19
24 import sys 20 import sys
25 import re 21 import re
26 22
27 GL_VERSION_REGEX = re.compile(r'^\d\.\d$') 23 GL_VERSION_REGEX = re.compile(r'^\d\.\d$')