From e956742235d6272e38424dc0c89b883153e776b7 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Wed, 24 Aug 2011 18:46:30 +0200 Subject: [PATCH] String exceptions do not work in Python >= 2.6. Signed-off-by: Torsten Werner --- dak/add_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dak/add_user.py b/dak/add_user.py index f2391bd6..8ab4d230 100755 --- a/dak/add_user.py +++ b/dak/add_user.py @@ -66,7 +66,7 @@ def HashPass(Password): Salt = Salt + SaltVals[ord(Rand.read(1)[0]) % len(SaltVals)] Pass = crypt.crypt(Password,Salt) if len(Pass) < 14: - raise "Password Error", "MD5 password hashing failed, not changing the password!" + raise RuntimeError("MD5 password hashing failed, not changing the password!") return Pass ################################################################################ -- 2.39.5