From 5b87dd18c173fa02574d97b7c1680c95f8d69424 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Thu, 9 Feb 2012 17:21:07 +0100 Subject: closed #534 - pyload crash, depositfiles 20gb limit workaround --- module/setup.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'module/setup.py') 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 -- cgit v1.2.3