From 0832ea97b1fae99c0ce7b2006d11963eab6126a5 Mon Sep 17 00:00:00 2001 From: yumaojun <719118794@qq.com> Date: Sun, 3 Jan 2016 21:11:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4sudo=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=92=8C=E4=BF=AE=E6=94=B9=E6=98=AF=20=E7=A9=BA=E6=A0=BC?= =?UTF-8?q?=E4=BC=9A=E8=A2=AB=E8=AF=86=E5=88=AB=E4=B8=BA=20=E5=88=86?= =?UTF-8?q?=E9=9A=94=E7=AC=A6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jperm/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jperm/views.py b/jperm/views.py index 33dce420b..bc56f6d3b 100644 --- a/jperm/views.py +++ b/jperm/views.py @@ -584,7 +584,7 @@ def perm_sudo_add(request): comment = request.POST.get("sudo_comment").strip() commands = request.POST.get("sudo_commands").strip() - pattern = re.compile(r'[ \n,\r]') + pattern = re.compile(r'[\n,\r]') commands = ', '.join(list_drop_str(pattern.split(commands), u'')) logger.debug(u'添加sudo %s: %s' % (name, commands)) @@ -617,7 +617,7 @@ def perm_sudo_edit(request): commands = request.POST.get("sudo_commands") comment = request.POST.get("sudo_comment") - pattern = re.compile(r'[ \n,\r]') + pattern = re.compile(r'[\n,\r]') commands = ', '.join(list_drop_str(pattern.split(commands), u'')).strip() logger.debug(u'添加sudo %s: %s' % (name, commands))