summaryrefslogtreecommitdiffstats
path: root/tools/moztreedocs/mach_commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/moztreedocs/mach_commands.py')
-rw-r--r--tools/moztreedocs/mach_commands.py6
1 files changed, 2 insertions, 4 deletions
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.