gitver: fix try/except syntax for python3 support
PATCH 1/1 gitver: fix try/except syntax for python3 support
https://www.python.org/dev/peps/pep-3110/
It's backward compatible with 2.6+
--- meta-oe/classes/gitver.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/classes/gitver.bbclass +2 -2
@@ -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:
Signature · 1 line
2.11.0
Quoted 19 lines · Alejandro Mery
https://www.python.org/dev/peps/pep-3110/
It's backward compatible with 2.6+
Signed-off-by Alejandro Mery <[email protected]>--- meta-oe/classes/gitver.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta-oe/classes/gitver.bbclass +1
-1@@ -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:
meta-oe/classes/gitver.bbclass def get_git_pv(path, d, tagadjust=None): · line 39
Quoted 10 lines
meta-oe/classes/gitver.bbclass +1
-1bb.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:
I forgot to mention, I'm having this problem using morty
Martin Jansa
AppliedQuoted 29 lines · Alejandro Mery
Quoted 28 lines · Alejandro Mery
https://www.python.org/dev/peps/pep-3110/
It's backward compatible with 2.6+
Signed-off-by Alejandro Mery <[email protected]>--- meta-oe/classes/gitver.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta-oe/classes/gitver.bbclass +2
-2@@ -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))
Quoted 3 lines
meta-oe/classes/gitver.bbclass def get_git_pv(path, d, tagadjust=None): · line 39
Quoted 1 line
meta-oe/classes/gitver.bbclass +0
-0if ver:I forgot to mention, I'm having this problem using
morty
Next time, please send version applicable and tested in master branch first, then you can request backport to morty.
I've applied this manually to master-next now.
Thanks
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 30 lines · Martin Jansa
Quoted 29 lines · Alejandro Mery
Quoted 28 lines · Alejandro Mery
https://www.python.org/dev/peps/pep-3110/
It's backward compatible with 2.6+
Signed-off-by Alejandro Mery <[email protected]>--- meta-oe/classes/gitver.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta-oe/classes/gitver.bbclass +2
-2@@ -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))
Quoted 4 lines
Quoted 2 lines
meta-oe/classes/gitver.bbclass def get_git_pv(path, d, tagadjust=None): · line 39
Quoted 1 line
meta-oe/classes/gitver.bbclass +0
-0if ver:I forgot to mention, I'm having this problem using
mortyNext time, please send version applicable and tested in master branch first, then you can request backport to morty.
sorry about that. does it help to send (tested) patches against both? (master and morty) or backporting only happens after the change goes from master-next into master anyway?
Quoted 1 line
I've applied this manually to master-next now.
thank you
Quoted 31 lines · Alejandro Mery
Quoted 30 lines · Martin Jansa
Quoted 29 lines · Alejandro Mery
Quoted 28 lines · Alejandro Mery
https://www.python.org/dev/peps/pep-3110/
It's backward compatible with 2.6+
Signed-off-by Alejandro Mery <[email protected]>--- meta-oe/classes/gitver.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta-oe/classes/gitver.bbclass +2
-2@@ -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))
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
meta-oe/classes/gitver.bbclass def get_git_pv(path, d, tagadjust=None): · line 39
Quoted 1 line
meta-oe/classes/gitver.bbclass +0
-0if ver:I forgot to mention, I'm having this problem using
mortyNext time, please send version applicable and tested in master branch first, then you can request backport to morty.
sorry about that. does it help to send (tested) patches against both? (master and morty) or backporting only happens after the change goes from master-next into master anyway?
Normally only after it's tested and merged in master.
You can send both at the same time, but then release branch maintainer needs to check and hold the change until it's merged in master (or update it if it gets updated before merge to master or even reject if rejected for master for whatever reason). So it's easier for maintainers if you send it after it's merged and you explicitly say which commit from master you're backporting to morty.
Quoted 4 lines
Quoted 1 line
I've applied this manually to master-next now.
thank you
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]