File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def return_issuer(self, issuer_id):
122122 :return: A KeyIssuer instance
123123 """
124124 _issuer = self ._get_issuer (issuer_id )
125- if not _issuer :
125+ if _issuer is None :
126126 return self ._add_issuer (issuer_id )
127127 return _issuer
128128
@@ -256,10 +256,9 @@ def get_issuer_keys(self, issuer_id):
256256 :return: A possibly empty list of keys
257257 """
258258 _issuer = self ._get_issuer (issuer_id )
259- if _issuer is not None :
260- return _issuer .all_keys ()
261- else :
259+ if _issuer is None :
262260 return []
261+ return _issuer .all_keys ()
263262
264263 @deprecated_alias (issuer = 'issuer_id' , owner = 'issuer_id' )
265264 def __contains__ (self , issuer_id ):
@@ -680,7 +679,7 @@ def load(self, info):
680679 @deprecated_alias (issuer = 'issuer_id' , owner = 'issuer_id' )
681680 def key_summary (self , issuer_id ):
682681 _issuer = self ._get_issuer (issuer_id )
683- if _issuer :
682+ if _issuer is not None :
684683 return _issuer .key_summary ()
685684
686685 raise KeyError ('Unknown Issuer ID: "{}"' .format (issuer_id ))
You can’t perform that action at this time.
0 commit comments