From 3f5b271370b9af23062f5049593541819d843108 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Mon, 9 Mar 2009 22:52:39 +0100 Subject: Fix the locale error on setup --- portato.py | 4 +++- portato/__init__.py | 17 +++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/portato.py b/portato.py index ada2699..800698a 100755 --- a/portato.py +++ b/portato.py @@ -19,11 +19,13 @@ import subprocess, threading import atexit from optparse import OptionParser, SUPPRESS_HELP -from portato import get_listener, log +from portato import get_listener, log, start from portato.helper import debug, info from portato.constants import VERSION, SU_COMMAND def main (): + start() # the first thing to do :) + # build the parser desc = "Portato - A Portage GUI." usage = "%prog [options] [frontend]" diff --git a/portato/__init__.py b/portato/__init__.py index fb2ed9f..63fd494 100644 --- a/portato/__init__.py +++ b/portato/__init__.py @@ -12,16 +12,17 @@ from __future__ import absolute_import -from . import log -import gettext, locale -from portato.constants import LOCALE_DIR, APP +def start(): + from . import log + import gettext, locale + from portato.constants import LOCALE_DIR, APP -# set gettext stuff -locale.setlocale(locale.LC_ALL, '') -gettext.install(APP, LOCALE_DIR, unicode = True) + # set gettext stuff + locale.setlocale(locale.LC_ALL, '') + gettext.install(APP, LOCALE_DIR, unicode = True) -# start logging -log.start(file=False) + # start logging + log.start(file=False) # listener-handling __listener = None -- cgit v1.2.3-54-g00ecf