From 2e3d306e84288989a1eaac130d7c91d2bc0dc085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 6 Nov 2017 23:53:31 -0500 Subject: [PATCH] Update WIP --- check_update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/check_update.py b/check_update.py index bb108c978..671ade4eb 100644 --- a/check_update.py +++ b/check_update.py @@ -1,5 +1,9 @@ from get_general_settings import * -import git +import os import subprocess -print subprocess.check_output(["git", "pull", '--dry-run', '--quiet', 'origin', branch], stderr=subprocess.STDOUT) +result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT).split('\n') + +if len(result) > 2: + subprocess.check_output(["git", "pull", 'origin', branch]) + os.execlp('python', os.path.join(os.path.dirname(__file__), 'bazarr.py'))