summaryrefslogtreecommitdiff
path: root/passlib/handlers/misc.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2011-03-28 01:51:39 -0400
committerEli Collins <elic@assurancetechnologies.com>2011-03-28 01:51:39 -0400
commit929f59a76b45ecd3101f5609493f3dd6e1fcd723 (patch)
tree588858bff51f221ba1f2524e5497fe4e78d97cfd /passlib/handlers/misc.py
parentd477d89822dbfc94bc52bc569f5352ffe402a7c4 (diff)
downloadpasslib-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.py8
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)
#=========================================================