summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-01-06 17:38:53 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-01-06 17:38:53 +0100
commitd56dcab5d48c8c4ec05f200f92bd35a1f977cd4f (patch)
tree6bc154635899269fddec8f8137476fd432a3edac /pyLoadCore.py
parentwebinterface fix (diff)
downloadpyload-d56dcab5d48c8c4ec05f200f92bd35a1f977cd4f.tar.xz
cli fix, webinterface db check
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index a5521cd70..c43fac3c8 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -30,13 +30,14 @@ import logging
import logging.handlers
from os import listdir
from os import makedirs
-from os import sep
+from os import sep
from os.path import basename
from os.path import abspath
from os.path import dirname
from os.path import exists
from os.path import join
-from os import execv
+from os import execv
+from sys import stdin
from re import sub
import subprocess
from sys import argv
@@ -66,9 +67,11 @@ class Core(object):
""" pyLoad Core """
def __init__(self):
if len(argv) > 1:
- if argv[1] == "-v":
- print "pyLoad", CURRENT_VERSION
- exit()
+ if argv[1] == "-v" or argv[1] == "--version":
+ print "pyLoad", CURRENT_VERSION
+ else:
+ print "Unknown Command"
+ exit()
def toggle_pause(self):
if self.thread_list.pause:
@@ -133,12 +136,11 @@ class Core(object):
self.last_update_check = 0
self.update_check_interval = 1800
self.update_available = self.check_update()
+ self.logger.info(_("Downloadtime: %s") % self.server_methods.is_time_download())
self.init_server()
self.init_webserver()
-
- self.logger.info(_("Downloadtime: %s") % self.server_methods.is_time_download())
linkFile = self.config['general']['link_file']
packs = self.server_methods.get_queue()
@@ -191,10 +193,10 @@ class Core(object):
def init_webserver(self):
- pyloadDBFile = join(self.path, "module", "web", "pyload.db")
- pyloadDefaultDBFile = join(self.path, "module", "web", "pyload_default.db")
- if not exists(pyloadDBFile):
- copyfile(pyloadDefaultDBFile, pyloadDBFile)
+ #pyloadDBFile = join(self.path, "module", "web", "pyload.db")
+ #pyloadDefaultDBFile = join(self.path, "module", "web", "pyload_default.db")
+ #if not exists(pyloadDBFile):
+ # copyfile(pyloadDefaultDBFile, pyloadDBFile)
if self.config['webinterface']['activated']:
self.webserver = WebServer(self)
self.webserver.start()