diff --git a/src/common.py b/src/common.py index b9612639c..17b1a09ce 100644 --- a/src/common.py +++ b/src/common.py @@ -125,7 +125,8 @@ def open_url_in_browser(link): else: import os, sys version = sys.version[:3] - file = INSTALL_PREFIX + '/lib/python' + version + '/site-packages/deluge/browser.py' + file = os.path.join(INSTALL_PREFIX, 'lib', 'python' \ + + version, 'site-packages', 'deluge', 'browser.py') os.spawnlp(os.P_NOWAIT, 'python', 'python', file, link) def is_url(url): diff --git a/src/info.py b/src/info.py index 5b2b88f54..645b07edf 100644 --- a/src/info.py +++ b/src/info.py @@ -4,6 +4,7 @@ import urllib import platform import gtk +import os import common pygtk = '%i.%i.%i' %(gtk.pygtk_version[0],gtk.pygtk_version[1],gtk.pygtk_version[2]) @@ -12,6 +13,6 @@ urllib.urlopen("http://download.deluge-torrent.org/stats.php?processor=" + \ platform.machine() + "&python=" + platform.python_version() \ + "&os=" + platform.system() + "&pygtk=" + pygtk) -f = open(common.CONFIG_DIR + '/infosent', 'w') +f = open(os.path.join(common.CONFIG_DIR, 'infosent'), 'w') f.write("") f.close diff --git a/src/interface.py b/src/interface.py index 66b05fe00..ceea07363 100644 --- a/src/interface.py +++ b/src/interface.py @@ -129,10 +129,12 @@ class DelugeGTK: if os.path.exists(common.CONFIG_DIR + '/infosent'): a=glob.glob(common.CONFIG_DIR + '/infosent')[0] if time.time() - os.stat(a)[8] >= 604800: - file = common.INSTALL_PREFIX + '/lib/python' + py_version + '/site-packages/deluge/info.py' + file = os.path.join(common.INSTALL_PREFIX, 'lib', 'python' \ + + py_version, 'site-packages', 'deluge', 'info.py') os.spawnlp(os.P_NOWAIT, 'python', 'python', file, common.PROGRAM_VERSION) else: - file = common.INSTALL_PREFIX + '/lib/python' + py_version + '/site-packages/deluge/info.py' + file = os.path.join(common.INSTALL_PREFIX, 'lib', 'python' \ + + py_version, 'site-packages', 'deluge', 'info.py') os.spawnlp(os.P_NOWAIT, 'python', 'python', file, common.PROGRAM_VERSION)