summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to '')
-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