Commit d53a573d authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Avoid error output from git update check

parent d56ab3f8
Pipeline #67095 passed with stage
in 13 seconds
......@@ -52,7 +52,7 @@ def check_for_update():
import os
import sys
import time
from subprocess import check_output, call
from subprocess import check_output, call, DEVNULL
if hasattr(sys.modules["mpcdf_common"], "checked_for_updates"):
return
......@@ -88,7 +88,7 @@ def check_for_update():
with open(rev_file, "r") as fd:
server_rev = fd.read().strip()
if call(["git", "--git-dir", git_dir, "merge-base", "--is-ancestor", server_rev, "HEAD"]) == 0:
if call(["git", "--git-dir", git_dir, "merge-base", "--is-ancestor", server_rev, "HEAD"], stderr=DEVNULL) == 0:
# Server rev is older than ours. Check again
update_server_rev()
......@@ -97,7 +97,7 @@ def check_for_update():
if server_rev != local_rev:
print("Note from MPCDF osc plugins:", file=sys.stderr)
if call(["git", "--git-dir", git_dir, "merge-base", "--is-ancestor", server_rev, "HEAD"]) == 0:
if call(["git", "--git-dir", git_dir, "merge-base", "--is-ancestor", server_rev, "HEAD"], stderr=DEVNULL) == 0:
print(" You have unpushed commits in", plugin_dir, "- consider pushing them", file=sys.stderr)
print(file=sys.stderr)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment