From 6b2d10317bd6e68f382e7e9c8e254df5559810cf Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 15 May 2020 15:04:28 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96=E4=B8=BB=E6=9C=BA?= =?UTF-8?q?=E5=BD=95=E5=85=A5=E8=87=AA=E5=8A=A8=E7=A7=BB=E9=99=A4=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/host/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spug_api/apps/host/views.py b/spug_api/apps/host/views.py index 0686338..a2866e2 100644 --- a/spug_api/apps/host/views.py +++ b/spug_api/apps/host/views.py @@ -26,8 +26,8 @@ class HostView(View): Argument('id', type=int, required=False), Argument('zone', help='请输入主机类型'), Argument('name', help='请输主机名称'), - Argument('username', help='请输入登录用户名'), - Argument('hostname', help='请输入主机名或IP'), + Argument('username', handler=str.strip, help='请输入登录用户名'), + Argument('hostname', handler=str.strip, help='请输入主机名或IP'), Argument('port', type=int, help='请输入SSH端口'), Argument('desc', required=False), Argument('password', required=False),