From 9d78f26807713c56b79c436cabd2b5f8031adf1f Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 29 Jan 2019 12:27:51 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E5=88=9B=E5=BB=BAHost=20Key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/signals_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/signals_handler.py b/apps/common/signals_handler.py index 7879f94b2..65721e155 100644 --- a/apps/common/signals_handler.py +++ b/apps/common/signals_handler.py @@ -71,7 +71,7 @@ def auto_generate_terminal_host_key(sender, **kwargs): try: if Setting.objects.filter(name='TERMINAL_HOST_KEY').exists(): return - except ProgrammingError: + except: return private_key, public_key = ssh_key_gen() value = json.dumps(private_key)