comparison scripts/pytouhou @ 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 e35a083d4208
comparison
equal deleted inserted replaced
569:b21922a03830 570:f0252cf111d8
47 logger.root.name = 'pytouhou' 47 logger.root.name = 'pytouhou'
48 48
49 logger.info('Configuration loaded from: %s', ', '.join(options.paths)) 49 logger.info('Configuration loaded from: %s', ', '.join(options.paths))
50 50
51 if not args.no_menu: 51 if not args.no_menu:
52 from pytouhou.menu import menu 52 try:
53 menu(options, args) 53 from pytouhou.menu import menu
54 except ImportError:
55 logger.error('GTK+ unavailable, disabling the GUI menu.')
56 else:
57 menu(options, args)
54 58
55 if args.game == 'EoSD': 59 if args.game == 'EoSD':
56 from pytouhou.games.eosd import EoSDCommon as Common, EoSDGame as Game 60 from pytouhou.games.eosd import EoSDCommon as Common, EoSDGame as Game
57 61
58 if args.interface == 'EoSD': 62 if args.interface == 'EoSD':