File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -229,24 +229,23 @@ def _get_keys(key):
229
229
except Exception :
230
230
pass
231
231
232
- # JWK Set per RFC 7517
233
- if 'keys' in key :
234
- return key ['keys' ]
235
-
236
- # Individual JWK per RFC 7517
237
- elif 'kty' in key :
238
- return (key ,)
239
-
240
- # Some other mapping. Firebase uses just dict of kid, cert pairs
241
- elif isinstance (key , Mapping ):
242
- values = key .values ()
243
- if values :
244
- return values
245
- return (key ,)
232
+ if isinstance (key , Mapping ):
233
+ if 'keys' in key :
234
+ # JWK Set per RFC 7517
235
+ return key ['keys' ]
236
+ elif 'kty' in key :
237
+ # Individual JWK per RFC 7517
238
+ return (key ,)
239
+ else :
240
+ # Some other mapping. Firebase uses just dict of kid, cert pairs
241
+ values = key .values ()
242
+ if values :
243
+ return values
244
+ return (key ,)
246
245
247
246
# Iterable but not text or mapping => list- or tuple-like
248
247
elif (isinstance (key , Iterable ) and
249
- not (isinstance (key , six .string_types ) or isinstance (key , Mapping ))):
248
+ not (isinstance (key , six .string_types ) or isinstance (key , six . binary_type ))):
250
249
return key
251
250
252
251
# Scalar value, wrap in tuple.
You can’t perform that action at this time.
0 commit comments