diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2011-03-28 01:51:39 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2011-03-28 01:51:39 -0400 |
commit | 929f59a76b45ecd3101f5609493f3dd6e1fcd723 (patch) | |
tree | 588858bff51f221ba1f2524e5497fe4e78d97cfd /passlib/handlers/misc.py | |
parent | d477d89822dbfc94bc52bc569f5352ffe402a7c4 (diff) | |
download | passlib-929f59a76b45ecd3101f5609493f3dd6e1fcd723.tar.gz |
replaced "raise exc, msg" with "raise exc(msg)" everywhere (working on py3k compat, changes made by 2to3)
Diffstat (limited to 'passlib/handlers/misc.py')
-rw-r--r-- | passlib/handlers/misc.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/passlib/handlers/misc.py b/passlib/handlers/misc.py index c0c402a..612929d 100644 --- a/passlib/handlers/misc.py +++ b/passlib/handlers/misc.py @@ -46,15 +46,15 @@ class unix_fallback(SimpleHandler): @classmethod def genhash(cls, secret, hash): if secret is None: - raise TypeError, "secret must be string" + raise TypeError("secret must be string") if hash is None: - raise ValueError, "no hash provided" + raise ValueError("no hash provided") return hash @classmethod def verify(cls, secret, hash): if hash is None: - raise ValueError, "no hash provided" + raise ValueError("no hash provided") return not hash class plaintext(SimpleHandler): @@ -81,7 +81,7 @@ class plaintext(SimpleHandler): @classmethod def verify(cls, secret, hash): if hash is None: - raise ValueError, "no hash specified" + raise ValueError("no hash specified") return hash == cls.genhash(secret, hash) #========================================================= |