def read_file(file_path):
            """
            Read file content and return content as string / unicode.

            NOTE: It's only mean to be used to read non-binary files since API right now doesn't
            support passing binary data.
            """
            if not os.path.exists(file_path):
                raise ValueError('File "%s" doesn\'t exist' % (file_path))

            if not os.path.isfile(file_path):
                raise ValueError('"%s" is not a file' % (file_path))

            with open(file_path, "rb") as fp:
                content = fp.read()

            return content.decode("utf-8")

            Read file content and return content as string / unicode.

            NOTE: It's only mean to be used to read non-binary files since API right now doesn't
            support passing binary data.
            
st2client/st2client/commands/action.py