mirror of https://github.com/fail2ban/fail2ban
typo/indent fix (no functional changes)
parent
6ce67a6d21
commit
06f2130575
|
@ -45,7 +45,7 @@ if PREFER_ENC.startswith('ANSI_'): # pragma: no cover
|
||||||
# caused by implicit converting of string/unicode (e. g. `str(u"\uFFFD")` produces an error
|
# caused by implicit converting of string/unicode (e. g. `str(u"\uFFFD")` produces an error
|
||||||
# if default encoding is 'ascii');
|
# if default encoding is 'ascii');
|
||||||
if sys.version_info < (3,): # pragma: 3.x no cover
|
if sys.version_info < (3,): # pragma: 3.x no cover
|
||||||
# correct default (global system) encoding (mostly UTF-8):
|
# correct default (global system) encoding (mostly UTF-8):
|
||||||
def __resetDefaultEncoding(encoding):
|
def __resetDefaultEncoding(encoding):
|
||||||
global PREFER_ENC
|
global PREFER_ENC
|
||||||
ode = sys.getdefaultencoding().upper()
|
ode = sys.getdefaultencoding().upper()
|
||||||
|
|
|
@ -40,7 +40,7 @@ logSys = getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def _json_default(x):
|
def _json_default(x):
|
||||||
"""Avoid errors on types unknow in json-adapters."""
|
"""Avoid errors on types unknown in json-adapters."""
|
||||||
if isinstance(x, set):
|
if isinstance(x, set):
|
||||||
x = list(x)
|
x = list(x)
|
||||||
return uni_string(x)
|
return uni_string(x)
|
||||||
|
|
Loading…
Reference in New Issue