mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-08-11 22:33:28 +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:
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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user