From 4b8b2afa137aa8da2cb94653423f7a11367d2574 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Thu, 24 Aug 2017 10:31:41 -0700 Subject: [PATCH] Bug 1390693 - Use separate variable for the base output directory; r=dustin An upcoming commit will want to put something outside the format-specific output directory. MozReview-Commit-ID: 2kYDREddpN --HG-- extra : rebase_source : 28454f71b3abbd094048edb568b4f5e8d50881d8 --- tools/docs/mach_commands.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/docs/mach_commands.py b/tools/docs/mach_commands.py index 58f7ee53feef..2446f837220b 100644 --- a/tools/docs/mach_commands.py +++ b/tools/docs/mach_commands.py @@ -47,7 +47,8 @@ class Documentation(MachCommandBase): outdir = os.path.join(self.topobjdir, 'docs') if not what: what = [os.path.join(self.topsrcdir, 'tools')] - outdir = os.path.join(outdir, format) + + format_outdir = os.path.join(outdir, format) generated = [] failed = [] @@ -61,7 +62,7 @@ class Documentation(MachCommandBase): # find project name to use as a namespace within `outdir` project = self._find_project_name(docdir) - savedir = os.path.join(outdir, project) + savedir = os.path.join(format_outdir, project) args = [ 'sphinx', @@ -92,7 +93,8 @@ class Documentation(MachCommandBase): if len(addr) != 2: return die('invalid address: %s' % http) - httpd = mozhttpd.MozHttpd(host=addr[0], port=addr[1], docroot=outdir) + httpd = mozhttpd.MozHttpd(host=addr[0], port=addr[1], + docroot=format_outdir) print('listening on %s:%d' % addr) httpd.start(block=True)