mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-20 11:38:34 +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>
This commit is contained in:
committed by
Martin Jansa
parent
0c31f55bcf
commit
b17bbbe224
@@ -27,13 +27,13 @@ def get_git_pv(path, d, tagadjust=None):
|
||||
gitdir = os.path.abspath(os.path.join(d.getVar("S"), ".git"))
|
||||
try:
|
||||
ver = gitrev_run("git describe --tags", gitdir)
|
||||
except Exception, exc:
|
||||
except Exception as exc:
|
||||
bb.fatal(str(exc))
|
||||
|
||||
if not ver:
|
||||
try:
|
||||
ver = gitrev_run("git rev-parse --short HEAD", gitdir)
|
||||
except Exception, exc:
|
||||
except Exception as exc:
|
||||
bb.fatal(str(exc))
|
||||
|
||||
if ver:
|
||||
|
||||
Reference in New Issue
Block a user