Compatibility fix
This commit is contained in:
parent
ab959ad834
commit
b06dc41a2c
@ -20,8 +20,11 @@ import locale
|
|||||||
import re
|
import re
|
||||||
import codecs
|
import codecs
|
||||||
|
|
||||||
# print() will output ascii, but we want utf-8
|
# print() will output ascii, but we want utf-8 (python3)
|
||||||
sys.stdout = codecs.getwriter('utf8')(sys.stdout.buffer)
|
try:
|
||||||
|
sys.stdout = codecs.getwriter('utf8')(sys.stdout.buffer)
|
||||||
|
except:
|
||||||
|
None
|
||||||
|
|
||||||
# Backward compatibilty to python2
|
# Backward compatibilty to python2
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user