You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/check_update.py

14 lines
542 B

from get_general_settings import *
import os
import subprocess
def check_and_apply_update():
result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT, shell=True, cwd=os.path.join(os.path.dirname(__file__))).split('\n')
if result[2] is not '':
subprocess.check_output(["git", "pull", 'origin', branch], shell=True, cwd=os.path.join(os.path.dirname(__file__)))
os.execlp('python', 'python ' + os.path.join(os.path.dirname(__file__), 'bazarr.py'))
return result