mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4273 from stephenfin/bug/1421
Fix #1421: Respect the quiet flag in sphinx-quickstart
This commit is contained in:
commit
638018cea0
@ -455,11 +455,13 @@ def generate(d, overwrite=True, silent=False, templatedir=None):
|
|||||||
def write_file(fpath, content, newline=None):
|
def write_file(fpath, content, newline=None):
|
||||||
# type: (unicode, unicode, unicode) -> None
|
# type: (unicode, unicode, unicode) -> None
|
||||||
if overwrite or not path.isfile(fpath):
|
if overwrite or not path.isfile(fpath):
|
||||||
print('Creating file %s.' % fpath)
|
if 'quiet' not in d:
|
||||||
|
print('Creating file %s.' % fpath)
|
||||||
with open(fpath, 'wt', encoding='utf-8', newline=newline) as f:
|
with open(fpath, 'wt', encoding='utf-8', newline=newline) as f:
|
||||||
f.write(content)
|
f.write(content)
|
||||||
else:
|
else:
|
||||||
print('File %s already exists, skipping.' % fpath)
|
if 'quiet' not in d:
|
||||||
|
print('File %s already exists, skipping.' % fpath)
|
||||||
|
|
||||||
conf_path = os.path.join(templatedir, 'conf.py_t') if templatedir else None
|
conf_path = os.path.join(templatedir, 'conf.py_t') if templatedir else None
|
||||||
if not conf_path or not path.isfile(conf_path):
|
if not conf_path or not path.isfile(conf_path):
|
||||||
|
Loading…
Reference in New Issue
Block a user