From: Torsten Werner Date: Wed, 24 Aug 2011 16:46:30 +0000 (+0200) Subject: String exceptions do not work in Python >= 2.6. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e956742235d6272e38424dc0c89b883153e776b7;p=dak String exceptions do not work in Python >= 2.6. Signed-off-by: Torsten Werner --- 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 ################################################################################