diff --git a/pysollib/mfxutil.py b/pysollib/mfxutil.py index f461ed10..2d743b44 100644 --- a/pysollib/mfxutil.py +++ b/pysollib/mfxutil.py @@ -107,9 +107,9 @@ def print_err(s, level=1): elif level == 2: ss = PACKAGE+': DEBUG WARNING:' try: - print_(ss, s.encode(locale.getpreferredencoding()), file=sys.stderr) - except Exception: print_(ss, s, file=sys.stderr) + except Exception: + print_(ss, s.encode(locale.getpreferredencoding()), file=sys.stderr) sys.stderr.flush()