def if_file_get_content(value):
    file_path = path.abspath(value)
    if path.isfile(file_path):
        try:
            f = open(file_path, 'rU')
        except IOError:
            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)
Checks if hotplug is generally supported.
dataset/ETHPy150Open cloudControl/cctrl/cctrl/addonoptionhelpers.py/if_file_get_content--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/HotplugSupported