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>
This commit is contained in:
parent
496a793d7b
commit
97d5b997cf
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue