convert arguments to unicode even if no locales are set
This commit is contained in:
parent
b7c23956b6
commit
9162f1c09e
1 changed files with 2 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ from weboob.core.backendscfg import BackendsConfig
|
||||||
from weboob.tools.config.iconfig import ConfigError
|
from weboob.tools.config.iconfig import ConfigError
|
||||||
from weboob.tools.backend import ObjectNotAvailable
|
from weboob.tools.backend import ObjectNotAvailable
|
||||||
from weboob.tools.log import createColoredFormatter, getLogger
|
from weboob.tools.log import createColoredFormatter, getLogger
|
||||||
|
from weboob.tools.misc import to_unicode
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['BaseApplication']
|
__all__ = ['BaseApplication']
|
||||||
|
|
@ -372,7 +373,7 @@ class BaseApplication(object):
|
||||||
klass.setup_logging(logging.INFO, [klass.create_default_logger()])
|
klass.setup_logging(logging.INFO, [klass.create_default_logger()])
|
||||||
|
|
||||||
if args is None:
|
if args is None:
|
||||||
args = [(sys.stdin.encoding and arg.decode(sys.stdin.encoding) or arg) for arg in sys.argv]
|
args = [(sys.stdin.encoding and arg.decode(sys.stdin.encoding) or to_unicode(arg)) for arg in sys.argv]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
app = klass()
|
app = klass()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue