[oe] [meta-oe][morty][PATCH 3/6] gitver: fix try/except syntax for python3 support
Alejandro Mery
amery at hanoverdisplays.com
Fri Jun 23 20:23:21 UTC 2017
https://www.python.org/dev/peps/pep-3110/
It's backward compatible with 2.6+
Signed-off-by: Alejandro Mery <amery at hanoverdisplays.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
meta-oe/classes/gitver.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta-oe/classes/gitver.bbclass b/meta-oe/classes/gitver.bbclass
index e7b5155ee..b677996ea 100644
--- a/meta-oe/classes/gitver.bbclass
+++ b/meta-oe/classes/gitver.bbclass
@@ -27,13 +27,13 @@ def get_git_pv(path, d, tagadjust=None):
gitdir = os.path.abspath(os.path.join(d.getVar("S", True), ".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:
--
2.13.0
More information about the Openembedded-devel
mailing list