misc: stdout encoding management in python part of sat.sh
This commit is contained in:
parent
1af958cd7e
commit
917bbe24b3
1 changed files with 6 additions and 1 deletions
|
|
@ -26,6 +26,10 @@ from sat.memory.memory import fixLocalDir
|
|||
from ConfigParser import SafeConfigParser
|
||||
from os.path import expanduser, join
|
||||
import sys
|
||||
import codecs
|
||||
import locale
|
||||
|
||||
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
|
||||
|
||||
fixLocalDir() # XXX: tmp update code, will be removed in the future
|
||||
|
||||
|
|
@ -41,11 +45,12 @@ env=[]
|
|||
env.append("PID_DIR='%s'" % join(expanduser(config.get('DEFAULT', 'pid_dir')),''))
|
||||
env.append("LOG_DIR='%s'" % join(expanduser(config.get('DEFAULT', 'log_dir')),''))
|
||||
|
||||
env.append("APP_NAME='%s'" % C.APP_NAME)
|
||||
env.append("APP_NAME_FILE='%s'" % C.APP_NAME_FILE)
|
||||
print ";".join(env)
|
||||
PYTHONEND
|
||||
`
|
||||
APP_NAME="Salut à Toi" # FIXME: the import from Python constants fails because of the à
|
||||
APP_NAME="$APP_NAME"
|
||||
PID_FILE="$PID_DIR$APP_NAME_FILE.pid"
|
||||
LOG_FILE="$LOG_DIR$APP_NAME_FILE.log"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue