def open()

in transcoder/source/file/FileMessageSource.py [0:0]


    def open(self):
        if self.path is not None:
            self.file_size = os.path.getsize(self.path)
            self.file_handle = open(self.path, mode=self.file_open_mode,  # pylint: disable=consider-using-with
                                    encoding=self.file_encoding)
        elif not sys.stdin.isatty():
            if sys.stdin.seekable():
                sys.stdin.seek(0, os.SEEK_END)
                self.file_size = sys.stdin.tell()
                sys.stdin.seek(0)
            else:
                self.log_percentage_read_enabled = False
            self.file_handle = sys.stdin.buffer.raw

        self.prepare()