def read_investment_settings_file(self, file_path=None):

        # Get default file path
        if file_path is None:
            file_path = os.path.join(self.settings_dir, self.investing_file)

            if not os.path.exists(file_path):
                f = open(file_path, 'w')
                f.write('{"profiles": {}}')
                f.close()

        if os.path.exists(file_path):
            self.logger.debug('Reading investment settings file: {0}'.format(file_path))
            try:
                # Read file
                f = open(file_path, 'r')
                jsonStr = f.read()
                f.close()

                self.logger.debug('Investment settings JSON: {0}'.format(jsonStr))

                # Convert JSON to dictionary
                jsonStr = self.process_json(jsonStr)
                saved_settings = json.loads(jsonStr)

                # Migrations
                saved_settings = self.migrate_settings(saved_settings)
                self.logger.debug('Normalized settings JSON: {0}'.format(saved_settings))
                return saved_settings

            except Exception as e:
                self.logger.debug('Could not read investment settings file: {0}'.format(str(e)))
                print jsonStr
                raise Exception('Could not process file \'{0}\': {1}'.format(file_path, str(e)))
        else:
            self.logger.debug('The file \'{0}\' doesn\'t exist'.format(file_path))
            raise Exception('The file \'{0}\' doesn\'t exist'.format(file_path))

        return False
Read a JSON file with investment settings and return the dictionary
dataset/ETHPy150Open jgillick/LendingClubAutoInvestor/lcinvestor/settings/__init__.py/Settings.read_investment_settings_file