Skip to content

Commit

Permalink
Merge pull request #394 from adhoc-dev/84292-jue
Browse files Browse the repository at this point in the history
[FIX] load_data: switch to binary mode for recent versions
  • Loading branch information
pedrobaeza authored Dec 17, 2024
2 parents 72298c3 + 9eb1e86 commit f010fdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openupgradelib/openupgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ def load_data(env_or_cr, module_name, filename, idref=None, mode="init"):
pathname = os.path.join(module_name, filename)

try:
fp = tools.file_open(pathname)
if version_info[0] >= 11:
fp = tools.file_open(pathname, "rb")
else:
fp = tools.file_open(pathname)
except OSError:
if tools.config.get("upgrade_path"):
for path in tools.config["upgrade_path"].split(","):
Expand Down

0 comments on commit f010fdd

Please sign in to comment.