From 4c3a32b51f56101a1ed788746aeb06b9a75fe7a3 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 26 Jan 2021 12:44:17 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Min RK --- jupyterhub/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyterhub/app.py b/jupyterhub/app.py index 028929ca..d5d35d5a 100644 --- a/jupyterhub/app.py +++ b/jupyterhub/app.py @@ -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: