summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-03-09 22:52:39 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-03-09 22:52:39 +0100
commit3f5b271370b9af23062f5049593541819d843108 (patch)
tree432407e3cb31f2758a8a6000966be997cb51465c
parent806e36d0d6a522f9b477cc1fa783da3c96742382 (diff)
downloadportato-3f5b271370b9af23062f5049593541819d843108.tar.gz
portato-3f5b271370b9af23062f5049593541819d843108.tar.bz2
portato-3f5b271370b9af23062f5049593541819d843108.zip
Fix the locale error on setup
-rwxr-xr-xportato.py4
-rw-r--r--portato/__init__.py17
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