]> err.no Git - dak/commitdiff
String exceptions do not work in Python >= 2.6.
authorTorsten Werner <twerner@debian.org>
Wed, 24 Aug 2011 16:46:30 +0000 (18:46 +0200)
committerTorsten Werner <twerner@debian.org>
Wed, 24 Aug 2011 16:47:35 +0000 (18:47 +0200)
Signed-off-by: Torsten Werner <twerner@debian.org>
dak/add_user.py

index f2391bd65acf59cf64a9613b4c5fbeb111dbb060..8ab4d2302077e41a69487b15203652bcad2cbac9 100755 (executable)
@@ -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
 
 ################################################################################