diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-22 12:47:30 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-22 12:47:30 +0300 |
commit | 5640cf879f91c8ca5e71b68ab5a5fd24b536703a (patch) | |
tree | 6fc2107d8adc1ade4f9a8ca260db4e156fdde609 /sphinx/cmd | |
parent | e83bb29789a093c651a255a509430a03346a5afb (diff) | |
parent | 43c089fd28dfdc33cc67b364724db51d3f5c1804 (diff) |
Merge branch '2.0'
Diffstat (limited to 'sphinx/cmd')
-rw-r--r-- | sphinx/cmd/quickstart.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index b28cd3519..83182ebf4 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -359,7 +359,7 @@ def generate(d: Dict, overwrite: bool = True, silent: bool = False, templatedir: ensuredir(d['path']) - srcdir = d['sep'] and path.join(d['path'], 'source') or d['path'] + srcdir = path.join(d['path'], 'source') if d['sep'] else d['path'] ensuredir(srcdir) if d['sep']: @@ -405,15 +405,15 @@ def generate(d: Dict, overwrite: bool = True, silent: bool = False, templatedir: batchfile_template = 'quickstart/make.bat_t' if d['makefile'] is True: - d['rsrcdir'] = d['sep'] and 'source' or '.' - d['rbuilddir'] = d['sep'] and 'build' or d['dot'] + 'build' + d['rsrcdir'] = 'source' if d['sep'] else '.' + d['rbuilddir'] = 'build' if d['sep'] else d['dot'] + 'build' # use binary mode, to avoid writing \r\n on Windows write_file(path.join(d['path'], 'Makefile'), template.render(makefile_template, d), '\n') if d['batchfile'] is True: - d['rsrcdir'] = d['sep'] and 'source' or '.' - d['rbuilddir'] = d['sep'] and 'build' or d['dot'] + 'build' + d['rsrcdir'] = 'source' if d['sep'] else '.' + d['rbuilddir'] = 'build' if d['sep'] else d['dot'] + 'build' write_file(path.join(d['path'], 'make.bat'), template.render(batchfile_template, d), '\r\n') |