def if_file_get_content(value):
    """
        if value is the path to a local file, read the content and return it
        otherwise just return value
    """
    file_path = path.abspath(value)
    if path.isfile(file_path):
        try:
            f = open(file_path, 'rU')
        except __HOLE__:
            pass
        else:
            content = f.read()
            f.close()
            return content

    if sys.platform == 'win32':
        # in windows, sys.argv is encoded in windows-1252
        return value.decode('windows-1252').encode('UTF-8')
    else:
        # all others use the same encoding for stdin and argv
        return recode_input(value)
dataset/ETHPy150Open cloudControl/cctrl/cctrl/addonoptionhelpers.py/if_file_get_content