def get_json_config(): settingspath = join(self.user_confpath, 'settings.json') jsonstr = open(settingspath).read() try: return helpers.json_loads(jsonstr) except Exception, e: logger.warning("settings.json: %s", str(e)) logger.warning("Failed to load settings: using defaults") return {}
def get_json_config(): settingspath = join(self.confpath, 'settings.json') jsonstr = open(settingspath).read() try: return helpers.json_loads(jsonstr) except Exception, e: print "settings.json: %s" % (str(e),) print "warning: failed to load settings.json, using defaults" return {}