salt stack

So in my version of salt, v2017.7.4 (Nitrogen), I was getting this error when I tried to use the file_tree ext_pillar:

Failed to load ext_pillar file_tree: must be str, not bytes

So I monkey patched my version of /usr/lib/python3/dist-packages/salt/pillar/, changing the file from binary to text:

            contents = ''
                # 2020-05-15 jj5 - changed 'rb' to 'r', will only work with text files...
                with salt.utils.fopen(file_path, 'r') as fhr:
                    buf =['file_buffer_size'])
                    while buf:
                        contents += buf
                        buf =['file_buffer_size'])
                    if contents.endswith('\n') \
                            and _check_newline(prefix,
                        contents = contents[:-1]