mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-17 04:37:19 +00:00
gitver: fix try/except syntax for python3 support
https://www.python.org/dev/peps/pep-3110/ It's backward compatible with 2.6+ Signed-off-by: Alejandro Mery <amery@hanoverdisplays.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
committed by
Armin Kuster
parent
1ec6d57e43
commit
2a53b11d6c
@@ -27,13 +27,13 @@ def get_git_pv(path, d, tagadjust=None):
|
|||||||
gitdir = os.path.abspath(os.path.join(d.getVar("S", True), ".git"))
|
gitdir = os.path.abspath(os.path.join(d.getVar("S", True), ".git"))
|
||||||
try:
|
try:
|
||||||
ver = gitrev_run("git describe --tags", gitdir)
|
ver = gitrev_run("git describe --tags", gitdir)
|
||||||
except Exception, exc:
|
except Exception as exc:
|
||||||
bb.fatal(str(exc))
|
bb.fatal(str(exc))
|
||||||
|
|
||||||
if not ver:
|
if not ver:
|
||||||
try:
|
try:
|
||||||
ver = gitrev_run("git rev-parse --short HEAD", gitdir)
|
ver = gitrev_run("git rev-parse --short HEAD", gitdir)
|
||||||
except Exception, exc:
|
except Exception as exc:
|
||||||
bb.fatal(str(exc))
|
bb.fatal(str(exc))
|
||||||
|
|
||||||
if ver:
|
if ver:
|
||||||
|
|||||||
Reference in New Issue
Block a user