summaryrefslogtreecommitdiff
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:22:41 +0000
commit33bea949bae54ddc89aa83cf07d7b1ee62e2b393 (patch)
tree1f0d83b4e922923e6d8765a82f931e30e91abae7 /meta/classes
parent36d94ed631f1a753482282fced7d3b7505d5e03d (diff)
downloadopenembedded-core-33bea949bae54ddc89aa83cf07d7b1ee62e2b393.tar.gz
openembedded-core-33bea949bae54ddc89aa83cf07d7b1ee62e2b393.tar.bz2
openembedded-core-33bea949bae54ddc89aa83cf07d7b1ee62e2b393.zip
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. Signed-off-by: Merten Sach <msach@mailbox.tu-berlin.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
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):
try:
with open("%s/.svn/entries" % path) as f:
revision = f.readlines()[3].strip()
- except IOError, IndexError:
+ except (IOError, IndexError):
pass
return revision