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-03 12:23:59 +0000
commit97d5b997cf34c58e8dfd85bbc868ae708a63b4b5 (patch)
treee47f871aa076d227f85189eaeea2e2685eebe46c /meta/classes
parent496a793d7b31d30e918d90ae257c01341aed05c1 (diff)
downloadpoky-97d5b997cf34c58e8dfd85bbc868ae708a63b4b5.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) 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>
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