d = os.getcwd()
os.chdir(os.path.dirname(migen.__file__))
try:
- r = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"])[:-1].decode("utf-8")
+ r = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"],
+ stderr=subprocess.DEVNULL)[:-1].decode("utf-8")
except:
r = "--------"
os.chdir(d)
d = os.getcwd()
os.chdir(os.path.dirname(litex.__file__))
try:
- r = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"])[:-1].decode("utf-8")
+ r = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"],
+ stderr=subprocess.DEVNULL)[:-1].decode("utf-8")
except:
r = "--------"
os.chdir(d)