diff --git a/ee/core/fileutils.py b/ee/core/fileutils.py index a703c7ee..354d1723 100644 --- a/ee/core/fileutils.py +++ b/ee/core/fileutils.py @@ -84,8 +84,9 @@ class EEFileUtils(): rstr: replace string """ try: - for line in fileinput.hook_encoded('utf-8').input(fnm, - inplace=True): + for line in fileinput.input(fnm, inplace=True, + openhook=fileinput. + hook_encoded('utf-8')): print(line.replace(sstr, rstr), end='') fileinput.close() except Exception as e: