mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-08 10:34:10 +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):
|
def _validate_secret_key(self, proposal):
|
||||||
"""Coerces strings with even number of hexadecimal characters to bytes."""
|
"""Coerces strings with even number of hexadecimal characters to bytes."""
|
||||||
r = proposal['value']
|
r = proposal['value']
|
||||||
if type(r) == str:
|
if isinstance(r, str):
|
||||||
try:
|
try:
|
||||||
return bytes.fromhex(r)
|
return bytes.fromhex(r)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Reference in New Issue
Block a user