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:
parent
ecf88a57bc
commit
97697b00bc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user