def __init__(self, file_path, mode="r"):
        self.path = file_path
        self.file = None
        if mode not in ('r', 'w'):
            raise ValueError(
                "mode must be 'r' or 'w', not %s" % mode)
        else:
            self.mode = mode
dataset/ETHPy150Open openstack/python-rackclient/rackclient/lib/syscall/default/file.py/File.__init__/original