From 9ff318e709746df5493c7f7c3a0547d443ca245b Mon Sep 17 00:00:00 2001 From: ngfchl Date: Fri, 26 Aug 2022 16:43:17 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=EF=BC=8C=E8=87=AA=E8=A1=8C=E9=80=89=E6=8B=A9=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B0=E6=9C=80=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_pt/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/auto_pt/views.py b/auto_pt/views.py index 610dd7d..90f5995 100644 --- a/auto_pt/views.py +++ b/auto_pt/views.py @@ -139,9 +139,11 @@ def restart_container(request): def do_get_update(request): update = 'false' p = subprocess.Popen('git log origin/master -1', shell=True, stdout=subprocess.PIPE, ) - content = p.stdout.readline() + content = p.stdout.readlines() p_remote = subprocess.Popen('git log remote/origin/master -1', shell=True, stdout=subprocess.PIPE, ) - content_remote = p_remote.stdout.readline() + content_remote = p_remote.stdout.readlines() + print(content) + print(content_remote) if content_remote == content: update = 'true' return JsonResponse(data=CommonResponse.success(