Mercurial > libervia-web
diff src/server/server.py @ 474:6700386291f1
server side: fix unicodes issues in options
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 12 Jun 2014 16:27:10 +0200 |
parents | d1565906f228 |
children | 647b293fae06 |
line wrap: on
line diff
--- a/src/server/server.py Tue Jun 10 16:02:45 2014 +0200 +++ b/src/server/server.py Thu Jun 12 16:27:10 2014 +0200 @@ -1006,15 +1006,15 @@ class Libervia(service.Service): DATA_DIR_DEFAULT = '' - OPT_PARAMETERS_BOTH = [['connection_type', 't', 'https', _(u"'http', 'https' or 'both' (to launch both servers)."), coerceConnectionType], - ['port', 'p', 8080, _(u'The port number to listen HTTP on.'), int], - ['port_https', 's', 8443, _(u'The port number to listen HTTPS on.'), int], - ['port_https_ext', 'e', 0, _(u'The external port number used for HTTPS (0 means port_https value).'), int], - ['ssl_certificate', 'c', 'libervia.pem', _(u'PEM certificate with both private and public parts.'), str], - ['redirect_to_https', 'r', 1, _(u'Automatically redirect from HTTP to HTTPS.'), int], - ['security_warning', 'w', 1, _(u'Warn user that he is about to connect on HTTP.'), int], - ['passphrase', 'k', '', _(u"Passphrase for the SàT profile named '%s'") % C.SERVICE_PROFILE, str], - ['data_dir', 'd', DATA_DIR_DEFAULT, _(u'Data directory for Libervia'), coerceDataDir], + OPT_PARAMETERS_BOTH = [['connection_type', 't', 'https', _(u"'http', 'https' or 'both' (to launch both servers).").encode('utf-8'), coerceConnectionType], + ['port', 'p', 8080, _(u'The port number to listen HTTP on.').encode('utf-8'), int], + ['port_https', 's', 8443, _(u'The port number to listen HTTPS on.').encode('utf-8'), int], + ['port_https_ext', 'e', 0, _(u'The external port number used for HTTPS (0 means port_https value).').encode('utf-8'), int], + ['ssl_certificate', 'c', 'libervia.pem', _(u'PEM certificate with both private and public parts.').encode('utf-8'), str], + ['redirect_to_https', 'r', 1, _(u'Automatically redirect from HTTP to HTTPS.').encode('utf-8'), int], + ['security_warning', 'w', 1, _(u'Warn user that he is about to connect on HTTP.').encode('utf-8'), int], + ['passphrase', 'k', '', (u"Passphrase for the SàT profile named '%s'" % C.SERVICE_PROFILE).encode('utf-8'), str], + ['data_dir', 'd', DATA_DIR_DEFAULT, _(u'Data directory for Libervia').encode('utf-8'), coerceDataDir], ] # options which are in sat.conf and on command line, see https://twistedmatrix.com/documents/current/api/twisted.python.usage.Options.html OPT_PARAMETERS_CFG = [['empty_password_allowed_warning_dangerous_list', None, '', None]] # Options which are in sat.conf only