summaryrefslogtreecommitdiff
path: root/sphinx/cmd/quickstart.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-12-15 15:43:44 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2018-12-15 17:19:56 -0800
commit5bf25eb44529cb0546b9b690a142ca7529a062f0 (patch)
tree13ae675ba4ec81e0eb0b39c71c114124affbfadc /sphinx/cmd/quickstart.py
parent6113261948523ef6cad74621dec10e0cbf0189c7 (diff)
downloadsphinx-git-5bf25eb44529cb0546b9b690a142ca7529a062f0.tar.gz
Avoid respecifying default encoding for .encode()/.decode() calls
In Python 3, both .encode() and .decode() default the encoding to 'utf-8'. See the docs: https://docs.python.org/3/library/stdtypes.html#str.encode https://docs.python.org/3/library/stdtypes.html#bytes.decode Simplify and shorten the code by using the default instead of respecifying it.
Diffstat (limited to 'sphinx/cmd/quickstart.py')
-rw-r--r--sphinx/cmd/quickstart.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py
index ce66f7352..8d48be298 100644
--- a/sphinx/cmd/quickstart.py
+++ b/sphinx/cmd/quickstart.py
@@ -172,7 +172,7 @@ def term_decode(text):
'and terminal encoding unknown -- assuming '
'UTF-8 or Latin-1.')))
try:
- return text.decode('utf-8')
+ return text.decode()
except UnicodeDecodeError:
return text.decode('latin1')