summaryrefslogtreecommitdiffstats
path: root/module/setup.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-02-09 17:21:07 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-02-09 17:21:07 +0100
commit5b87dd18c173fa02574d97b7c1680c95f8d69424 (patch)
tree3f4114c8ad51a19de15429898aa2015f1e88a2f0 /module/setup.py
parentfilefactory premium, uloz.to new url pattern (diff)
downloadpyload-5b87dd18c173fa02574d97b7c1680c95f8d69424.tar.xz
closed #534 - pyload crash, depositfiles 20gb limit workaround
Diffstat (limited to 'module/setup.py')
-rw-r--r--module/setup.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/module/setup.py b/module/setup.py
index f90afe23a..42b24859f 100644
--- a/module/setup.py
+++ b/module/setup.py
@@ -460,23 +460,16 @@ class Setup():
p1 = True
p2 = False
while p1 != p2:
- if os.name == "nt":
- qst = str("Password: ") #no unicode on windows
- else:
- qst = _("Password: ")
-
- p1 = getpass(qst.encode("utf-8"))
+ # getpass(_("Password: ")) will crash on systems with broken locales (Win, NAS)
+ sys.stdout.write(_("Password: "))
+ p1 = getpass("")
if len(p1) < 4:
- print _("Password to short. Use at least 4 symbols.")
+ print _("Password too short. Use at least 4 symbols.")
continue
- if os.name == "nt":
- qst = str("Password (again): ")
- else:
- qst = _("Password (again): ")
-
- p2 = getpass(qst.encode("utf-8"))
+ sys.stdout.write(_("Password (again): "))
+ p2 = getpass("")
if p1 == p2:
return p1