summaryrefslogtreecommitdiff
path: root/openid/extensions/draft/pape2.py
diff options
context:
space:
mode:
authorVlastimil Zíma <vlastimil.zima@nic.cz>2018-05-02 13:43:53 +0200
committerVlastimil Zíma <vlastimil.zima@nic.cz>2018-05-11 13:40:03 +0200
commitea790df687c2581fd5526a9598aad5a7eb35bfe4 (patch)
tree79790a7ef3081aa7763b66ad92ee4ac49afc5610 /openid/extensions/draft/pape2.py
parentafe8559a35e9a018b0ac1b6d077d973b8b93e457 (diff)
downloadopenid-ea790df687c2581fd5526a9598aad5a7eb35bfe4.tar.gz
Python 3 compatible boolean conversions
Diffstat (limited to 'openid/extensions/draft/pape2.py')
-rw-r--r--openid/extensions/draft/pape2.py5
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