summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMerten Sach <msach@mailbox.tu-berlin.de>2014-11-22 22:54:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:18:53 +0000
commitdfd5bbdfa9d87a806e6a5fcdf1561dd7ddebdf50 (patch)
treed1d485f307d7b3414ca30aecc0c4d2df2a0d23df /meta/classes
parent49ece9bb51a3289974b1166cba71243c49fc318a (diff)
downloadpoky-dfd5bbdfa9d87a806e6a5fcdf1561dd7ddebdf50.tar.gz
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) (From OE-Core rev: 4a3f37f7d004b196b9caeb558d3461452dd85edc) Signed-off-by: Merten Sach <msach@mailbox.tu-berlin.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/metadata_scm.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index ba0edf9486..237e61821d 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):
60 try: 60 try:
61 with open("%s/.svn/entries" % path) as f: 61 with open("%s/.svn/entries" % path) as f:
62 revision = f.readlines()[3].strip() 62 revision = f.readlines()[3].strip()
63 except IOError, IndexError: 63 except (IOError, IndexError):
64 pass 64 pass
65 return revision 65 return revision
66 66