diff options
Diffstat (limited to 'openid/extensions/draft/pape2.py')
-rw-r--r-- | openid/extensions/draft/pape2.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openid/extensions/draft/pape2.py b/openid/extensions/draft/pape2.py index 529f329..e8dec91 100644 --- a/openid/extensions/draft/pape2.py +++ b/openid/extensions/draft/pape2.py @@ -62,10 +62,13 @@ class Request(Extension): self.preferred_auth_policies = preferred_auth_policies self.max_auth_age = max_auth_age - def __nonzero__(self): + def __bool__(self): return bool(self.preferred_auth_policies or self.max_auth_age is not None) + def __nonzero__(self): + return self.__bool__() + def addPolicyURI(self, policy_uri): """Add an acceptable authentication policy URI to this request |