mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-08 02:24:08 +00:00
Apply suggestions from code review
Co-authored-by: Min RK <benjaminrk@gmail.com>
This commit is contained in:
@@ -862,7 +862,7 @@ class JupyterHub(Application):
|
||||
def _validate_secret_key(self, proposal):
|
||||
"""Coerces strings with even number of hexadecimal characters to bytes."""
|
||||
r = proposal['value']
|
||||
if type(r) == str:
|
||||
if isinstance(r, str):
|
||||
try:
|
||||
return bytes.fromhex(r)
|
||||
except ValueError:
|
||||
|
Reference in New Issue
Block a user