[oe-commits] [meta-openembedded] 11/29: gitver: fix try/except syntax for python3 support

git at git.openembedded.org git at git.openembedded.org
Tue Aug 8 19:02:16 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch morty-next
in repository meta-openembedded.

commit 2a53b11d6cd99c05868c8d04e78c1c9ffd0a59ac
Author: Alejandro Mery <amery at hanoverdisplays.com>
AuthorDate: Wed Mar 1 14:19:08 2017 +0000

    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 at hanoverdisplays.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Armin Kuster <akuster808 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 e7b5155..b677996 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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list