summaryrefslogtreecommitdiff
path: root/doc/sphinx/load_config.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-11-30 09:33:31 -0500
committerTom Rini <trini@konsulko.com>2023-11-30 09:33:31 -0500
commit4a363dd516856344558034027e40d903868f67b4 (patch)
tree64f693d7178aa2d5c94e08557194ccad2cf41e77 /doc/sphinx/load_config.py
parent6357cf0cc4eaded5326cd10bca359ade2969708a (diff)
parente22d5799dc86298ad8388ddcb3b759e166c142b7 (diff)
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next
Device tree improvents for Paz00 and DM PMIC convertion of recently merged Tegra boards.
Diffstat (limited to 'doc/sphinx/load_config.py')
-rw-r--r--doc/sphinx/load_config.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/sphinx/load_config.py b/doc/sphinx/load_config.py
index eeb394b39e2..8b416bfd75a 100644
--- a/doc/sphinx/load_config.py
+++ b/doc/sphinx/load_config.py
@@ -3,7 +3,7 @@
import os
import sys
-from sphinx.util.pycompat import execfile_
+from sphinx.util.osutil import fs_encoding
# ------------------------------------------------------------------------------
def loadConfig(namespace):
@@ -48,7 +48,9 @@ def loadConfig(namespace):
sys.stdout.write("load additional sphinx-config: %s\n" % config_file)
config = namespace.copy()
config['__file__'] = config_file
- execfile_(config_file, config)
+ with open(config_file, 'rb') as f:
+ code = compile(f.read(), fs_encoding, 'exec')
+ exec(code, config)
del config['__file__']
namespace.update(config)
else: