comparison main.py @ 172:5d47ad053aef

Fixed code that was still using the (removed) parpg settings module.
author Beliar <KarstenBock@gmx.net>
date Sun, 26 Feb 2012 01:58:36 +0100
parents b3b82c2aebee
children 94196a3e9c07
comparison
equal deleted inserted replaced
171:565ffdd98d68 172:5d47ad053aef
33 logging.basicConfig(filename=opts.logfile, level=levels[opts.loglevel]) 33 logging.basicConfig(filename=opts.logfile, level=levels[opts.loglevel])
34 logger = logging.getLogger('parpg') 34 logger = logging.getLogger('parpg')
35 35
36 try: 36 try:
37 old_path = sys.path 37 old_path = sys.path
38 sys.path = [settings.parpg.FifePath] 38 sys.path = [settings.get("parpg", "FifePath")]
39 import fife 39 import fife
40 except AttributeError: 40 except AttributeError:
41 logger.warning('[parpg] section has no FifePath option') 41 logger.warning('parpg section has no FifePath option')
42 except ImportError: 42 except ImportError:
43 logger.critical("Could not import fife module. Please install fife or add " 43 logger.critical("Could not import fife module. Please install fife or add "
44 "'FifePath' to the [parpg] section of your settings file") 44 "'FifePath' to the parpg section of your settings file")
45 sys.exit(1) 45 sys.exit(1)
46 finally: 46 finally:
47 sys.path = old_path 47 sys.path = old_path
48 48
49 from parpg.application import PARPGApplication 49 from parpg.application import PARPGApplication