Commit 9d78f268 authored by ibuler's avatar ibuler

[Update] 创建Host Key

parent 0d0cf045
...@@ -71,7 +71,7 @@ def auto_generate_terminal_host_key(sender, **kwargs): ...@@ -71,7 +71,7 @@ def auto_generate_terminal_host_key(sender, **kwargs):
try: try:
if Setting.objects.filter(name='TERMINAL_HOST_KEY').exists(): if Setting.objects.filter(name='TERMINAL_HOST_KEY').exists():
return return
except ProgrammingError: except:
return return
private_key, public_key = ssh_key_gen() private_key, public_key = ssh_key_gen()
value = json.dumps(private_key) value = json.dumps(private_key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment