From: Merten Sach Date: Sat, 22 Nov 2014 21:54:55 +0000 (+0100) Subject: metadata_scm: Fix crash due to uncaught python exception X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a3f37f7d004b196b9caeb558d3461452dd85edc;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git metadata_scm: Fix crash due to uncaught python exception Function base_get_metadata_svn_revision was crashing due to an uncaught IndexError exception. The except notation without parentheses is legacy syntax. It is the equivalent to 'except IOError as IndexError' which is not what we want here. The change catches both exceptions. (From OE-Core rev: 33bea949bae54ddc89aa83cf07d7b1ee62e2b393) Signed-off-by: Merten Sach Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster --- diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass index ba0edf9486d..237e61821dc 100644 --- a/meta/classes/metadata_scm.bbclass +++ b/meta/classes/metadata_scm.bbclass @@ -60,7 +60,7 @@ def base_get_metadata_svn_revision(path, d): try: with open("%s/.svn/entries" % path) as f: revision = f.readlines()[3].strip() - except IOError, IndexError: + except (IOError, IndexError): pass return revision