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/phpass.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/phpass.py')
-rw-r--r-- | passlib/handlers/phpass.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/passlib/handlers/phpass.py b/passlib/handlers/phpass.py index 6c93554..bb9bfd9 100644 --- a/passlib/handlers/phpass.py +++ b/passlib/handlers/phpass.py @@ -78,10 +78,10 @@ class phpass(ExtendedHandler): def norm_ident(cls, ident, strict=False): if not ident: if strict: - raise ValueError, "no ident specified" + raise ValueError("no ident specified") ident = "P" if ident not in ("P", "H"): - raise ValueError, "invalid ident: %r" % (ident,) + raise ValueError("invalid ident: %r" % (ident,)) return ident #========================================================= @@ -111,10 +111,10 @@ class phpass(ExtendedHandler): @classmethod def from_string(cls, hash): if not hash: - raise ValueError, "no hash specified" + raise ValueError("no hash specified") m = cls._pat.match(hash) if not m: - raise ValueError, "invalid phpass portable hash" + raise ValueError("invalid phpass portable hash") ident, rounds, salt, chk = m.group("ident", "rounds", "salt", "chk") return cls( ident=ident, |