def _test(): import logging import admin_logger admin_logger.install() LOGGER.setLevel(logging.DEBUG) install() LOGGER.debug("testing %s"% __file__) LOGGER.debug("proxy_servers = %s "% SETTINGS.om_connections) LOGGER.debug(SETTINGS.CONNECTION_CONFDIRS)
import gettext import os import settings import admin_logger admin_logger.install() settings.install() lang = os.environ.get("LANG") if lang: try: LOGGER.debug( "trying to install %s as your environment language"% lang) lang1 = gettext.translation('openmolar', languages=[lang,]) lang1.install(unicode=True) except IOError: LOGGER.warning("%s not found, using default"% lang) gettext.install('openmolar', unicode=True) else: LOGGER.warning( "no language environment found - this should not happen!") gettext.install('openmolar', unicode=True)
import gettext import os import settings import admin_logger admin_logger.install() settings.install() lang = os.environ.get("LANG") if lang: try: LOGGER.debug("trying to install %s as your environment language" % lang) lang1 = gettext.translation('openmolar', languages=[ lang, ]) lang1.install(unicode=True) except IOError: LOGGER.warning("%s not found, using default" % lang) gettext.install('openmolar', unicode=True) else: LOGGER.warning("no language environment found - this should not happen!") gettext.install('openmolar', unicode=True)