summaryrefslogtreecommitdiffstats
path: root/module/setup/Setup.py
diff options
context:
space:
mode:
authorGravatar godofdream <soilfiction@gmail.com> 2012-11-05 21:16:05 +0100
committerGravatar godofdream <soilfiction@gmail.com> 2012-11-05 21:16:05 +0100
commite94cd224f79fe8b1079e85c1a58d8c9a35d3e666 (patch)
treea5553a8b2a2aa334d3f661236ea329a31a8360a4 /module/setup/Setup.py
parentnew Setup system, JQuery Web-If (diff)
downloadpyload-e94cd224f79fe8b1079e85c1a58d8c9a35d3e666.tar.xz
Reworking Setup
Diffstat (limited to 'module/setup/Setup.py')
-rw-r--r--module/setup/Setup.py29
1 files changed, 5 insertions, 24 deletions
diff --git a/module/setup/Setup.py b/module/setup/Setup.py
index ae177bbb7..ee7c8d67e 100644
--- a/module/setup/Setup.py
+++ b/module/setup/Setup.py
@@ -25,6 +25,7 @@ from subprocess import PIPE, call
import sys
from sys import exit
from module.utils import get_console_encoding
+from module.setup import System_Checks
class Setup():
"""
@@ -125,7 +126,8 @@ class Setup():
def start_cli(self):
self.ask_lang()
-
+
+ System_Checks.
print _("Welcome to the pyLoad Configuration Assistent.")
print _("It will check your system and make a basic setup in order to run pyLoad.")
@@ -140,7 +142,7 @@ class Setup():
print _("When you are ready for system check, hit enter.")
raw_input()
- self.get_page_next()
+ for self.get_page_next().
@@ -382,7 +384,6 @@ class Setup():
print "openssl req -days 36500 -x509 -key ssl.key -in ssl.csr > ssl.crt "
print ""
print _("If you're done and everything went fine, you can activate ssl now.")
-
self.config["ssl"]["activated"] = self.ask(_("Activate SSL?"), self.yes, bool=True)
def set_user(self):
@@ -459,34 +460,14 @@ class Setup():
except Exception, e:
print _("Setting config path failed: %s") % str(e)
- def print_dep(self, name, value):
- """Print Status of dependency"""
- if value:
- print _("%s: OK") % name
- else:
- print _("%s: missing") % name
- def check_module(self, module):
- try:
- __import__(module)
- return True
- except:
- return False
- def check_prog(self, command):
- pipe = PIPE
- try:
- call(command, stdout=pipe, stderr=pipe)
- return True
- except:
- return False
+
def ask_cli(self, qst, default, answers=[], bool=False, password=False):
- """produce one line to asking for input"""
if answers:
info = "("
-
for i, answer in enumerate(answers):
info += (", " if i != 0 else "") + str((answer == default and "[%s]" % answer) or answer)