bazarr/check_update.py

10 lines
346 B
Python
Raw Normal View History

2017-10-28 02:18:16 +00:00
from get_general_settings import *
2017-11-07 04:53:31 +00:00
import os
2017-11-07 04:23:36 +00:00
import subprocess
2017-11-07 04:53:31 +00:00
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'))