mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-19 05:41:00 +00:00
Cleanup new get_encoded_writer() function.
This commit is contained in:
parent
c1eb8d85e9
commit
ec8e529406
1 changed files with 3 additions and 2 deletions
|
|
@ -175,8 +175,9 @@ def lang_trans (lang, curlang):
|
|||
return lang_transis[lang][curlang]
|
||||
|
||||
|
||||
def get_encoded_writer (out=sys.stdout, encoding=i18n.default_encoding,
|
||||
errors='replace'):
|
||||
def get_encoded_writer (out=sys.stdout, encoding=None, errors='replace'):
|
||||
"""Get wrapped output writer with given encoding and error handling."""
|
||||
if encoding is None:
|
||||
encoding = default_encoding
|
||||
Writer = codecs.getwriter(encoding)
|
||||
return Writer(out, errors)
|
||||
|
|
|
|||
Loading…
Reference in a new issue