summaryrefslogtreecommitdiffstats
path: root/module/setup.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-02-09 17:23:50 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-02-09 17:23:50 +0100
commita046a952ec7d109df90ff082de6b0c57a6363a96 (patch)
tree7e36cae3067fd500609e22eb43b5567ba6a47098 /module/setup.py
parentLoadTo pattern fix (diff)
parentclosed #534 - pyload crash, depositfiles 20gb limit workaround (diff)
downloadpyload-a046a952ec7d109df90ff082de6b0c57a6363a96.tar.xz
Merge
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