summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-11-07 16:35:52 +0100
committerGravatar spoob <spoob@gmx.de> 2009-11-07 16:35:52 +0100
commitad4c9161a404f59828ed33fb02faa2fee33140c5 (patch)
treed2de6b387533660a92eb02400d3c1cf630926069
parenttried fix #36 - please test (diff)
downloadpyload-ad4c9161a404f59828ed33fb02faa2fee33140c5.tar.xz
fixed old bug
-rwxr-xr-xpyLoadCore.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 81d6e9550..c6410e6a6 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -26,8 +26,11 @@ import logging
import logging.handlers
from os import mkdir
from os import sep
+from os import chdir
from os.path import basename
from os.path import exists
+from os.path import dirname
+from os.path import abspath
from sys import argv
from sys import exit
from sys import path
@@ -57,6 +60,7 @@ class Core(object):
""" pyLoad main
"""
def __init__(self):
+ chdir(dirname(abspath(__file__)) + sep)
self.config = {}
self.plugin_folder = "module" + sep + "plugins"
self.plugins_avaible = {}
@@ -64,7 +68,6 @@ class Core(object):
self.read_config()
self.do_kill = False
-
translation = gettext.translation("pyLoad", "locale", languages=[self.config['general']['language']])
translation.install(unicode=True)
@@ -101,7 +104,6 @@ class Core(object):
"""
self.configfile = ConfigParser.SafeConfigParser()
self.configfile.read('config')
-
for section in self.configfile.sections():
self.config[section] = {}
for option in self.configfile.options(section):