diff options
author | Armin <Armin@Armin-PC.diedering.lan> | 2015-04-05 14:13:00 +0200 |
---|---|---|
committer | Armin <Armin@Armin-PC.diedering.lan> | 2015-04-05 14:13:00 +0200 |
commit | 0d41aec246eb110cc33c966fad7227177e7e5190 (patch) | |
tree | d74b3c5b0ff04eee5361d00084b07c608e3bcd34 | |
parent | fix gui (diff) | |
download | pyload-0d41aec246eb110cc33c966fad7227177e7e5190.tar.xz |
fix setup
-rw-r--r-- | pyload/__init__.py | 2 | ||||
-rw-r--r-- | pyload/config/Setup.py | 6 | ||||
-rw-r--r-- | pyload/network/JsEngine.py | 15 |
3 files changed, 12 insertions, 11 deletions
diff --git a/pyload/__init__.py b/pyload/__init__.py index c89e55a3c..39f6c8bee 100644 --- a/pyload/__init__.py +++ b/pyload/__init__.py @@ -86,7 +86,7 @@ except IOError: if os.name == "posix": configdir = os.path.join(homedir, ".pyload-beta") else: - configdir = os.path.join(homedir, "pyload") + configdir = os.path.join(homedir, "pyload-beta") try: if not os.path.exists(configdir): diff --git a/pyload/config/Setup.py b/pyload/config/Setup.py index 081184652..835a2978b 100644 --- a/pyload/config/Setup.py +++ b/pyload/config/Setup.py @@ -506,8 +506,8 @@ class SetupAssistant(object): pwlen = 8 while p1 != p2: sys.stdout.write(_("Password: ")) - p1 = getpass("") - + p1 = getpass("").strip("\n\r") + print("passwd:'%s'" % p1) if len(p1) < pwlen: print _("Password too short! Use at least %s symbols." % pwlen) continue @@ -516,7 +516,7 @@ class SetupAssistant(object): continue sys.stdout.write(_("Password (again): ")) - p2 = getpass("") + p2 = getpass("").strip("\n\r") if p1 == p2: return p1 diff --git a/pyload/network/JsEngine.py b/pyload/network/JsEngine.py index 6ae90f299..ed7d49d27 100644 --- a/pyload/network/JsEngine.py +++ b/pyload/network/JsEngine.py @@ -123,7 +123,7 @@ class AbstractEngine(object): def find(cls): """ Check if the engine is available """ try: - __import__(cls.__name) + __import__(cls._name) except Exception: try: out, err = cls(True).eval("23+19") @@ -157,7 +157,7 @@ class AbstractEngine(object): class Pyv8Engine(AbstractEngine): - __name = "pyv8" + _name = "PyV8" def eval(self, script): @@ -176,11 +176,12 @@ class Pyv8Engine(AbstractEngine): class CommonEngine(AbstractEngine): - __name = "js" + _name = "js" def setup(self): - subprocess.Popen(["js", "-v"], bufsize=-1).communicate() + # subprocess.Popen(["js", "-v"], bufsize=-1).communicate() + pass def eval(self, script): @@ -191,7 +192,7 @@ class CommonEngine(AbstractEngine): class NodeEngine(AbstractEngine): - __name = "nodejs" + _name = "nodejs" def setup(self): @@ -206,7 +207,7 @@ class NodeEngine(AbstractEngine): class RhinoEngine(AbstractEngine): - __name = "rhino" + _name = "rhino" def setup(self): @@ -235,7 +236,7 @@ class RhinoEngine(AbstractEngine): class JscEngine(AbstractEngine): - __name = "javascriptcore" + _name = "javascriptcore" def setup(self): |