From 467c6af263bdfd7ee9ebbc9a4e01dec7f8aea442 Mon Sep 17 00:00:00 2001 From: oysteini Date: Sat, 4 Sep 2010 14:29:14 +0000 Subject: [PATCH] Satte inn fanging av UnicodeEncodeError. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Det viser seg at pwd.getpwnam blir gretten av ikke-ASCII-tegn. Man risikerer at denne blir kalt hvis man søker etter noe i Buy-menyen og ikke får noen treff. --- helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers.py b/helpers.py index e1d7263..0fc3437 100644 --- a/helpers.py +++ b/helpers.py @@ -29,6 +29,8 @@ def system_user_exists(username): pwd.getpwnam(username) except KeyError: return False + except UnicodeEncodeError: + return False else: return True