comparison sat/tools/config.py @ 2836:ad00f61fd9f5

core (log): add traceback when "exc_info" is set
author Goffi <goffi@goffi.org>
date Sun, 03 Mar 2019 12:04:55 +0100
parents 6aa22011bc6d
children 121c4a2a567c
comparison
equal deleted inserted replaced
2835:6aa22011bc6d 2836:ad00f61fd9f5
73 """look for main .ini configuration file, and parse it""" 73 """look for main .ini configuration file, and parse it"""
74 config = SafeConfigParser(defaults=C.DEFAULT_CONFIG) 74 config = SafeConfigParser(defaults=C.DEFAULT_CONFIG)
75 try: 75 try:
76 config.read(C.CONFIG_FILES) 76 config.read(C.CONFIG_FILES)
77 except Exception as e: 77 except Exception as e:
78 log.error(_(u"Can't read main config: {msg}").format(msg=e)) 78 log.error(_(u"Can't read main config: {msg}").format(msg=e), exc_info=True)
79 return config 79 return config
80 80
81 81
82 def getConfig(config, section, name, default=None): 82 def getConfig(config, section, name, default=None):
83 """Get a configuration option 83 """Get a configuration option