def get_persistent_data(per_path=None):
    per_data = {'recent_workspaces': [], 'workspaces': {}}
    per_path = per_path or os.path.join(G.BASE_DIR, 'persistent.json')
    try:
        per = open(per_path, 'rb')
    except (IOError, __HOLE__):
        msg.debug('Failed to open ', per_path, '. Recent workspace list will be empty.')
        return per_data
    try:
        data = per.read().decode('utf-8')
        persistent_data = json.loads(data)
    except Exception as e:
        msg.debug('Failed to parse ', per_path, '. Recent workspace list will be empty.')
        msg.debug(str_e(e))
        msg.debug(data)
        return per_data
    if 'recent_workspaces' not in persistent_data:
        persistent_data['recent_workspaces'] = []
    if 'workspaces' not in persistent_data:
        persistent_data['workspaces'] = {}
    return persistent_data
dataset/ETHPy150Open Floobits/floobits-sublime/floo/common/utils.py/get_persistent_data