1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 17:16:23 +01:00

- use the default enconding if LANG is not set

This commit is contained in:
Marcus Hüwe 2009-07-12 18:31:50 +00:00
parent ecf88a57bc
commit 97697b00bc

View File

@ -8,7 +8,10 @@ import sys, locale
# this is a hack to make osc work as expected with utf-8 characters, no matter
# how site.py is set...
reload(sys)
sys.setdefaultencoding(locale.getdefaultlocale()[1])
loc = locale.getdefaultlocale()[1]
if not loc:
loc = sys.getdefaultencoding()
sys.setdefaultencoding(loc)
del sys.setdefaultencoding
from osc import commandline