]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
metadata_scm: Fix crash due to uncaught python exception
authorMerten Sach <msach@mailbox.tu-berlin.de>
Sat, 22 Nov 2014 21:54:55 +0000 (22:54 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Dec 2014 12:22:41 +0000 (12:22 +0000)
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.

Signed-off-by: Merten Sach <msach@mailbox.tu-berlin.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/metadata_scm.bbclass

index ba0edf9486deda033845307e377631bad7a4ac23..237e61821dc1f61db1a1b4bf8b7872ee0e970763 100644 (file)
@@ -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