From f3bcaf9f88aad2c423ebcd61121562f9834187d4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 17:11:27 +0200 Subject: Merging upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- tools/moztreedocs/mach_commands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tools/moztreedocs') diff --git a/tools/moztreedocs/mach_commands.py b/tools/moztreedocs/mach_commands.py index 6f44c65c20..84bdaf79fb 100644 --- a/tools/moztreedocs/mach_commands.py +++ b/tools/moztreedocs/mach_commands.py @@ -21,6 +21,7 @@ import yaml from mach.decorators import Command, CommandArgument, SubCommand from mach.registrar import Registrar from mozbuild.util import memoize +from mozfile import load_source here = os.path.abspath(os.path.dirname(__file__)) topsrcdir = os.path.abspath(os.path.dirname(os.path.dirname(here))) @@ -363,11 +364,8 @@ def toggle_no_autodoc(): @memoize def _read_project_properties(): - import imp - path = os.path.normpath(manager().conf_py_path) - with open(path, "r") as fh: - conf = imp.load_module("doc_conf", fh, path, (".py", "r", imp.PY_SOURCE)) + conf = load_source("doc_conf", path) # Prefer the Mozilla project name, falling back to Sphinx's # default variable if it isn't defined. -- cgit v1.2.3